-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
45 lines (41 loc) · 1.07 KB
/
docker-compose.prod.yml
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
42
43
44
45
version: "3"
services:
db:
container_name: project-name-postgres-prod
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=$PGUSER
- POSTGRES_PASSWORD=$PGPASSWORD
- POSTGRES_DB=$PGDATABASE
volumes:
- project-name-database:/var/lib/postgresql/data
networks:
- project-name-network
app:
container_name: project-name-app-prod
command: yarn start:prod
environment:
- NODE_ENV=$NODE_ENV
- PGHOST=$PGHOST
- PGPORT=$PGPORT
- PGUSER=$PGUSER
- PGPASSWORD=$PGPASSWORD
- PGDATABASE=$PGDATABASE
image: project-name:latest
restart: always
ports:
- "3000:3000"
build:
context: .
dockerfile: Dockerfile
networks:
- project-name-network
depends_on:
- db
networks:
project-name-network:
external: true
volumes:
project-name-database: {}