File tree 3 files changed +73
-0
lines changed
3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ sample.env
2
+ .env
3
+ README.md
4
+ eslint.config.js
5
+ .github
6
+ docs
7
+ node_modules
8
+ tests
Original file line number Diff line number Diff line change
1
+ ARG NODE_VERSION=20.16.0
2
+
3
+ FROM node:${NODE_VERSION}-alpine as builder
4
+ WORKDIR /app
5
+
6
+ # Download dependencies as a separate step to take advantage of Docker's caching.
7
+ # Leverage a cache mount to /root/.npm to speed up subsequent builds.
8
+ # Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into
9
+ # into this layer.
10
+ RUN --mount=type=bind,source=package.json,target=package.json \
11
+ --mount=type=bind,source=package-lock.json,target=package-lock.json \
12
+ --mount=type=cache,target=/root/.npm \
13
+ npm ci
14
+
15
+ COPY . .
16
+
17
+ FROM node:${NODE_VERSION}-alpine
18
+
19
+ WORKDIR /app
20
+ USER node
21
+
22
+ COPY --from=builder /app .
23
+
24
+ ARG PORT=3000
25
+ ENV PORT $PORT
26
+ EXPOSE $PORT
Original file line number Diff line number Diff line change
1
+ services :
2
+ postgres-ucpa :
3
+ image : postgres:15.8-alpine
4
+ container_name : ucpa-postgres
5
+ networks :
6
+ - back
7
+ ports :
8
+ - ' ${UCPA_DATABASE_PORT_API:-5466}:5432'
9
+ environment :
10
+ POSTGRES_HOST_AUTH_METHOD : trust
11
+ POSTGRES_DB : ucpa_facilitator
12
+ env_file :
13
+ - .env
14
+
15
+ app-ucpa :
16
+ build :
17
+ context : .
18
+ container_name : app-ucpa
19
+ command : >
20
+ sh -c "npm run db:migrate && npm start"
21
+ networks :
22
+ - back
23
+ - web
24
+ environment :
25
+ NODE_ENV : production
26
+ env_file :
27
+ - .env
28
+ labels :
29
+ traefik.enable : true
30
+ traefik.docker.network : web
31
+ traefik.http.routers.ucpa.rule : Host(`${URL}`)
32
+ traefik.http.routers.ucpa.entrypoints : websecure
33
+ traefik.http.routers.ucpa.tls : true
34
+ traefik.http.routers.ucpa.tls.certresolver : letsencrypt
35
+
36
+ networks :
37
+ back :
38
+ web :
39
+ external : true
You can’t perform that action at this time.
0 commit comments