-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (87 loc) · 2.38 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '3.9'
networks:
transcendence:
driver: bridge
name: transcendence
services:
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# DATABASE #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
database:
networks:
- transcendence
build: srcs/db
container_name: db
image: postgres
env_file:
- "./.env"
# volumes:
# - "db:/var/lib/postgresql/data"
restart: always
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# BACK-TEND #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
back-end:
depends_on:
- database
networks:
- transcendence
build: srcs/back-end
container_name: back-end
image: back-end
environment:
- DATABASE_URL=${DATABASE_URL}
- WEBSITE_URL=${WEBSITE_URL}
- CLIENT_ID_42_API=${CLIENT_ID_42_API}
- CLIENT_SECRET_42_API=${CLIENT_SECRET_42_API}
- CLIENT_SECRET_BACKEND=${CLIENT_SECRET_BACKEND}
- CLIENT_ID_GMAIL_API=${CLIENT_ID_GMAIL_API}
- CLIENT_SECRET_GMAIL_API=${CLIENT_SECRET_GMAIL_API}
- REFRESH_TOKEN_GMAIL_API=${REFRESH_TOKEN_GMAIL_API}
- EMAIL=${EMAIL}
ports:
- "4000:4000"
- "5555:5555"
volumes:
- "./srcs/back-end/ft_transcendence:/ft_transcendence"
restart: always
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# FRONT-TEND #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
front-end:
depends_on:
- database
- back-end
networks:
- transcendence
build: srcs/front-end
container_name: front-end
image: front-end
environment:
- REACT_APP_API_42_URL=${API_42_URL}
- REACT_APP_WEBSITE_URL=${WEBSITE_URL}
- REACT_APP_CLIENT_SECRET_BACKEND=${CLIENT_SECRET_BACKEND}
ports:
- "8080:8080"
volumes:
- "./srcs/front-end/ft_transcendence:/ft_transcendence"
restart: always
# volumes:
# db:
# driver: local
# driver_opts:
# o: 'bind'
# type: 'none'
# device: '/${HOME}/data/db'
# back-end:
# driver: local
# driver_opts:
# o: 'bind'
# type: 'none'
# device: './srcs/back-end/ft_transcendence/'
# front-end:
# driver: local
# driver_opts:
# o: 'bind'
# type: 'none'
# device: './srcs/front-end/ft_transcendence'