forked from 3DPong/transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (92 loc) · 1.93 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
92
93
94
95
96
97
98
99
100
version: '3.8'
# 개발용 환경입니다.
services:
api-server:
build: ./backend
container_name: api-server
depends_on:
- postgresql
expose:
- "${APP_PORT}"
networks:
- backend
volumes:
- type: bind
source: ./docker-volume/image-data
target: /app/storage/images
working_dir: /app
env_file:
- .env
front-server:
build: ./frontend
container_name: front-server
depends_on:
- api-server
expose:
- "8081"
networks:
- backend
working_dir: /app
env_file:
- .env
postgresql:
image: postgres:15-alpine
container_name: postgresql
expose:
- "${POSTGRES_PORT}"
networks:
- backend
volumes:
- type: bind
source: ./docker-volume/postgres-data
target: /var/lib/postgresql/data
env_file:
- .env
command: -p "${POSTGRES_PORT}"
redis:
image: bitnami/redis
container_name: redis
expose:
- "${REDIS_PORT_NUMBER}"
networks:
- backend
volumes:
- type: bind
source: ./docker-volume/redis-data
target: /bitnami
env_file:
- .env
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
networks:
- backend
restart: always
ports:
- "5050:80"
volumes:
- type: bind
source: ./docker-volume/pgadmin-data
target: /var/lib/pgadmin
env_file:
- .env
nginx:
image: nginx:1.23.4-alpine
container_name: nginx
ports:
- "${EXTERNAL_PORT}:${NGINX_PORT}"
networks:
- backend
env_file:
- .env
volumes:
- ./nginx/nginx.conf.template:/etc/nginx/nginx.conf.template
- ./nginx/apply_nginx_env.sh:/apply_nginx_env.sh
- ./docker-volume/nginx-data/log:/var/log/nginx
depends_on:
- front-server
- api-server
command: ["/bin/sh", "/apply_nginx_env.sh"]
networks:
backend:
driver: bridge