-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathDockerfile.allinone
More file actions
30 lines (26 loc) · 896 Bytes
/
Dockerfile.allinone
File metadata and controls
30 lines (26 loc) · 896 Bytes
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
FROM node:24-alpine AS base
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
FROM base AS front-end-builder
WORKDIR /app
COPY package-lock.json package.json /app/
RUN npm install
FROM golang:1.25-alpine AS back-end-builder
ENV CGO_ENABLED=1
RUN apk add gcc musl-dev sqlite
WORKDIR /src
COPY ./backend/ .
RUN go build .
FROM base AS app
RUN apk add nginx bash
WORKDIR /app
ENV ALLOWED_ORIGINS="*"
COPY --chmod=755 docker/allinone/start.sh /start.sh
COPY ./games/ /app/games/
COPY --from=back-end-builder /src/Cold-Friendly-Feud /app/Cold-Friendly-Feud
COPY --from=front-end-builder /app/node_modules/ /app/node_modules/
COPY docker/allinone/nginx.conf /etc/nginx/nginx.conf
COPY dev/cert/ /etc/nginx/cert/
COPY . /app/
RUN npm run build
CMD ["/start.sh"]