-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (71 loc) · 1.71 KB
/
docker-compose.yml
File metadata and controls
77 lines (71 loc) · 1.71 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: "3.7"
services:
nginx:
container_name: nginx
build: ./nginx
ports:
- 8000:80
- 443:443
volumes:
# Main config
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/log/:/var/log/nginx/
- ./nginx/html:/var/www/html
# Server blocks config
- ./nginx/conf.d/:/etc/nginx/conf.d/
depends_on:
- client
- api
client:
container_name: client
build: ./client
restart: "always"
volumes:
- ./client/:/client/
env_file:
- ./.dev.common.env
- ./client/.dev.env
expose:
- 3000
api:
container_name: api
build:
context: ./api
dockerfile: Dockerfile
restart: "no"
volumes:
# Recompile code on changes
- ./api/src:/api/src
- ./api/tsconfig.json:/api/tsconfig.json
# the path after `:` (i.e. `/music/`) should match the path in
# `MUSIC_LIB_DIR` variable in `./api/.dev.env`
- /mnt/CE64EB6A64EB53AD/music_archive/:/music/
env_file:
- ./.dev.common.env
- ./api/.dev.env
- ./db-music/.dev.env
# Publicly exposed ports
ports:
# node.js process is listening for a debugging client on
- 9229:9229
# Ports are not exposed publicly (i.e. to host machine);
# they are only exposed to other services:
expose:
# Node.js application server
- 5000
depends_on:
- db-music
db-music:
container_name: db-music
image: postgres
restart: "no"
env_file:
- ./db-music/.dev.env
# Publicly exposed ports (to simplify debugging)
ports:
- 54323:5432
volumes:
- ./db-music/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
frontnet:
driver: bridge