-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose-dev.yml
62 lines (62 loc) · 1.29 KB
/
docker-compose-dev.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
51
52
53
54
55
56
57
58
59
60
61
62
version: '3.7'
services:
##############
## POSTGRES ##
postgres_db:
image: postgres
networks:
- database
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=demo
restart: always
volumes:
- ./server/database/data/dev:/var/lib/postgresql/data
container_name: postgres_db
##############
## SERVER ##
server:
build:
context: ./server
dockerfile: Dockerfile.dev
networks:
- webapp
- database
ports:
- 5500:5500
environment:
- SECRET="¯\_(ツ)_/¯"
volumes:
- ./server/node_modules:/app/node_modules
- ./server/src:/app/src
depends_on:
- postgres_db
restart: always
command: ['./wait-for-it.sh', 'postgres_db:5432', '--', 'nodemon']
container_name: server
#############
## CLIENT ##
client:
build:
context: ./client
dockerfile: Dockerfile.dev
env_file:
- ./client/.env
volumes:
- ./client/node_modules:/app/node_modules
- ./client/src:/app/src
- ./client/public:/app/public
networks:
- webapp
ports:
- 3000:3000
command: npm start
stdin_open: true
restart: always
container_name: client
networks:
webapp:
driver: bridge
database:
driver: bridge