forked from satisfactorymodding/smr-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (21 loc) · 806 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM oven/bun:1.1.20 as build
ARG NODE_ENV_ARG=production
RUN apt update && apt install -y curl unzip git bash
SHELL ["/bin/bash", "-c"]
WORKDIR /app
COPY package.json package.json
COPY bun.lockb bun.lockb
RUN bun install --ignore-scripts
COPY . .
RUN NODE_ENV=$NODE_ENV_ARG set -o allexport; set -ex; source .env.$NODE_ENV_ARG; set +o allexport && bun run prepare && bun run graphql-codegen && bun run translations && bun run build:$NODE_ENV_ARG
FROM ghcr.io/vilsol/yeet:v0.6.4 as yeet
FROM oven/bun:1.1.20
COPY --from=yeet /yeet /yeet
RUN apt update && apt install -y bash
WORKDIR /app
COPY --from=build /app/build /app/build
RUN cd /app/build/node && bun install --no-save
COPY docker/entrypoint.sh /entrypoint.sh
ENV HOST_HEADER=host
EXPOSE 80
ENTRYPOINT ["bash", "/entrypoint.sh"]