-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 1.14 KB
/
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
version: '3'
services:
db:
container_name: pastebin-db
image: postgres:10
env_file: # declare environment variables
- config/db.env
networks:
- psqldb_network
volumes: # Volumes for database
- psqldb_volume:/var/lib/postgresql/data
web:
container_name: pastebin-web
build: .
env_file: # declare environment variables
- config/app.env
volumes: # Volumes for project files configration and static files
- ./src:/opt/services/pastebin/src
- static_volume:/opt/services/pastebin/static
networks:
- nginx_network
- psqldb_network
depends_on:
- db
nginx:
container_name: pastebin-nginx
image: nginx:1.13
ports: # mapping prot
- 80:80
volumes: # Volumes for nginx configration and static files
- ./config/web:/etc/nginx/conf.d
- static_volume:/opt/services/pastebin/static
depends_on: # wait for web service to be "ready" before starting this service
- web
networks:
- nginx_network
networks:
psqldb_network:
driver: bridge
nginx_network:
driver: bridge
volumes:
psqldb_volume:
static_volume: