-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·104 lines (98 loc) · 2.34 KB
/
docker-compose.yml
File metadata and controls
executable file
·104 lines (98 loc) · 2.34 KB
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
101
102
103
104
services:
mongodb:
image: mongo:latest
container_name: mongodb
restart: always
ports:
- "27017:27017"
ulimits:
nofile:
soft: 64000
hard: 64000
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
GLIBC_TUNABLES: glibc.pthread.rseq=0 # tcmalloc does not fully support rseq (help)
volumes:
- mongodb_data:/data/db
networks:
- internal
redis:
image: redis:latest
container_name: redis
restart: always
ports:
- "12379:6379"
volumes:
- redis_data:/data
command: ["redis-server", "--appendonly", "yes"] # Enable AOF persistence
networks:
- internal
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.0
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
volumes:
- esdata:/usr/share/elasticsearch/data
networks:
- internal
app:
build:
context: .
dockerfile: Dockerfile
container_name: workout-app
restart: always
ports:
- "1221:1221"
- "465:465"
env_file:
- .env
- settings.env
environment:
PORT: 1221
SECRET_KEY: ${SECRET_KEY}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_DATABASE: ${MONGO_DATABASE}
MONGO_URI: ${MONGO_URI}
REDIS_HOST: redis
REDIS_PORT: 6379
depends_on:
- mongodb
- redis
- elasticsearch # app starts last
volumes:
- app_data:/data
- app_exports:/exports
- ./logs:/logs
networks:
- internal
- default
admin-portal:
build:
context: ../admin-portal
dockerfile: Dockerfile
args:
REACT_APP_API_BASE_URL: ${REACT_APP_API_BASE_URL}
env_file:
- ../admin-portal/.env
environment:
- REACT_APP_API_BASE_URL=https://workoutep.ion606.com
ports:
- "1122:80"
restart: always
volumes:
mongodb_data:
redis_data:
app_data:
app_exports:
esdata:
networks:
internal:
name: workout_app_internal_network
internal: true
default: # host-accessible networking
driver: bridge