forked from jackcrane/slu-open-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.e2e
More file actions
38 lines (31 loc) · 842 Bytes
/
Dockerfile.e2e
File metadata and controls
38 lines (31 loc) · 842 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
31
32
33
34
35
36
37
38
FROM node:22-alpine AS base
# System deps for API + test orchestration
RUN apk add --no-cache \
ca-certificates \
openssl \
wget \
bash \
netcat-openbsd
ENV NODE_ENV=production
# Build-time args (optional)
ARG SENTRY_AUTH_TOKEN
ARG DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
ENV DATABASE_URL=${DATABASE_URL}
# --- Build frontend ---
WORKDIR /app
COPY ./app/ ./
RUN yarn install --frozen-lockfile || yarn install
RUN yarn build
# --- Prepare backend ---
WORKDIR /api
COPY ./api/ ./
RUN yarn install --frozen-lockfile || yarn install
RUN npx prisma generate
# Copy e2e entrypoint
WORKDIR /
COPY e2e/docker/api-entrypoint.sh /api-entrypoint.sh
RUN chmod +x /api-entrypoint.sh
EXPOSE 3030
ENTRYPOINT ["/api-entrypoint.sh"]
CMD ["npm", "run", "start"]