-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
50 lines (49 loc) · 990 Bytes
/
docker-compose.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
46
47
48
49
50
version: '3'
services:
#############
## SERVER ##
server:
build:
context: ./server
dockerfile: Dockerfile
networks:
- webapp
- database
depends_on:
- postgres_db
environment:
- SECRET='¯\_(ツ)_/¯'
restart: always
command: ['./wait-for-it.sh', 'postgres_db:5432', '--', 'node', 'main.js']
container_name: server
#############
## CLIENT ##
client:
build:
context: ./client
dockerfile: Dockerfile
networks:
- webapp
ports:
- 80:80
restart: always
container_name: client
##############
## POSTGRES ##
postgres_db:
image: postgres
networks:
- database
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=demo
volumes:
- ./server/database/data/prod:/var/lib/postgresql/data/
restart: always
container_name: postgres_db
networks:
webapp:
driver: bridge
database:
driver: bridge