-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yaml
46 lines (44 loc) · 902 Bytes
/
docker-compose.yaml
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
46
version: '3.8'
services:
psqldb:
image: postgres:14.4
restart: unless-stopped
env_file: ./.env
environment:
- POSTGRES_PASSWORD=$PSQL_ROOT_PASSWORD
- POSTGRES_USER=$PSQL_USER
- POSTGRES_DB=$PSQL_DATABASE
ports:
- $PSQL_LOCAL_PORT:$PSQL_DOCKER_PORT
volumes:
- db:/var/lib/postgres
networks:
- backend
webapp:
depends_on:
- psqldb
build:
context: ./webapp
args:
- DB_HOST=psqldb
- DB_USER=$PSQL_USER
- DB_USER_PW=$PSQL_ROOT_PASSWORD
- DB_NAME=$PSQL_DATABASE
- DB_PORT=$PSQL_DOCKER_PORT
restart: unless-stopped
networks:
- backend
nginx:
image: nginx:latest
depends_on:
- webapp
ports:
- $LOCAL_PORT:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
networks:
- backend
volumes:
db:
networks:
backend: