Skip to content
This repository was archived by the owner on May 6, 2023. It is now read-only.

Commit 7d15ea9

Browse files
committed
set up docker image for the app to run on
1 parent 090ac89 commit 7d15ea9

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Dockerfile

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM frolvlad/alpine-glibc
2+
3+
WORKDIR /app
4+
5+
RUN apk update && \
6+
apk add curl bash unzip && \
7+
curl https://bun.sh/install > ./install.sh && \
8+
chmod a+x install.sh && \
9+
./install.sh
10+
11+
SHELL ["/bin/bash", "-c"]
12+
13+
RUN touch ~/.bashrc && \
14+
echo 'export BUN_INSTALL="$HOME/.bun"' >> ~/.bashrc && \
15+
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> ~/.bashrc && \
16+
source ~/.bashrc && \
17+
bun init -y && \
18+
bun a buxt && \
19+
bun install
20+
21+
COPY routes/ /app/routes
22+
COPY dev.ts /app/dev.ts
23+
COPY entrypoint.sh /app/entrypoint.sh
24+
25+
RUN chmod a+x entrypoint.sh
26+
27+
EXPOSE 3001
28+
29+
CMD ["bash", "entrypoint.sh"]

entrypoint.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
echo 'export BUN_INSTALL="$HOME/.bun"' >> ~/.bashrc && \
4+
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> ~/.bashrc && \
5+
source ~/.bashrc
6+
bun run dev.ts

0 commit comments

Comments
 (0)