-
Notifications
You must be signed in to change notification settings - Fork 26
/
compose.yml
73 lines (67 loc) · 1.41 KB
/
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
version: "3"
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
restart: always
build:
context: .
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 8000:80
server:
container_name: server
restart: always
build:
context: ./backend
dockerfile: Dockerfile
env_file: ./backend/.env
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_PORT=${DB_PORT}
command: ./start.sh
volumes:
- ./backend:/app
depends_on:
- db
- nginx
client:
container_name: client
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend:/app
restart: always
depends_on:
- nginx
db:
image: mongo:latest
container_name: mongodb
restart: always
volumes:
- db:/data/db
env_file:
- ./backend/.env
environment:
- MONGO_INITDB_DATABASE=${DB_NAME}
- MONGO_INITDB_ROOT_USERNAME=${DB_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASSWORD}
redis:
image: redis:alpine
container_name: redis
restart: always
command: redis-server --save 60 1 --loglevel verbose
volumes:
- redis:/data
volumes:
db:
driver: local
redis:
driver: local