-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (68 loc) · 1.41 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
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
version: '3'
services:
nginx:
build:
context: backend/nginx
dockerfile: Dockerfile
container_name: nginx
networks:
- transcendence
ports:
- "9001:9001"
- "9002:9002"
volumes:
- ./frontend:/usr/share/nginx/html/
- ./backend/nginx/conf.d:/etc/nginx/conf.d/
- ${KEY_}:/etc/nginx/ssl/pong.key
- ${CERT_}:/etc/nginx/ssl/pong.crt
restart: always
depends_on:
- ruby
- db
env_file: .env
ruby:
build:
context: backend/ruby
dockerfile: Dockerfile
container_name: ruby
networks:
- transcendence
ports:
- "8080:8080"
- "4567:4567"
volumes:
- ./backend/ruby/srcs:/var/server
- ${KEY_}:/var/ssl/pong.key
- ${CERT_}:/var/ssl/pong.crt
restart: always
depends_on:
- db
env_file: .env
db:
build:
context: backend/db
dockerfile: Dockerfile
container_name: db
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: pong
networks:
- transcendence
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
restart: always
volumes:
db_data:
driver: local
driver_opts:
type: none
device: ./local/db
o: bind
name: db_data_volume
networks:
transcendence:
driver: bridge