-
-
Notifications
You must be signed in to change notification settings - Fork 281
Expand file tree
/
Copy pathdockerfile
More file actions
30 lines (23 loc) · 584 Bytes
/
dockerfile
File metadata and controls
30 lines (23 loc) · 584 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:20.3-alpine
# Setup workspace
WORKDIR /app
ENV DATABASE_URL=postgresql://postgres:postgres@pgsql:5432/postgres?schema=public
# Copy runtime files
COPY ./config/ ./temp_config
COPY docker_run.sh .
COPY locales ./locales
# Prisma builds
COPY prisma ./prisma
RUN npx prisma generate --schema=./prisma/docker.prisma
# Install dependencies
COPY package.json .
RUN npm install
# Transpile the source
COPY tsconfig.json .
COPY src ./src
RUN npm run build
# Setup Bash
RUN apk add --no-cache bash
RUN chmod +x ./docker_run.sh
# Start the server
ENTRYPOINT ["./docker_run.sh"]