forked from mycelia-tech/mycelia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (122 loc) · 3.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
129 lines (122 loc) · 3.09 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
services:
redis:
image: redis:8-alpine
command:
- redis-server
- --requirepass ${REDIS_PASSWORD}
- --protected-mode yes
- --bind 0.0.0.0
volumes:
- ${REDIS_HOST_PATH:-redis_data}:/data
restart: always
environment:
- REDIS_PASSWORD
mongo:
image: mongo:8.2
entrypoint: ["/mongo-entrypoint.sh"]
command: mongod --config /etc/mongod.conf
volumes:
- ${MONGO_HOST_PATH:-mongo_data}:/data/db
- ./misc/mongo/mongod.conf:/etc/mongod.conf:ro
- ./misc/mongo/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
- ./misc/mongo/mongo-entrypoint.sh:/mongo-entrypoint.sh:ro
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME
- MONGO_INITDB_ROOT_PASSWORD
ports:
- "27017:27017"
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
# mongo-search:
# image: mongodb/mongodb-community-search:latest
# entrypoint: ["/mongot-entrypoint.sh"]
# volumes:
# - ${MONGO_SEARCH_HOST_PATH:-mongo_search_data}:/data/mongot
# - ./misc/mongo/mongot.conf:/mongot-community/config.default.yml:ro
# - ./misc/mongo/mongot-entrypoint.sh:/mongot-entrypoint.sh:ro
# environment:
# - MONGO_INITDB_ROOT_USERNAME
# - MONGO_INITDB_ROOT_PASSWORD
# depends_on:
# - mongo
frontend:
image: bakuutin/mycelia-frontend:dev
build:
context: .
dockerfile: ./frontend/Dockerfile.${FRONTEND_MODE:-prod}
expose:
- "8080"
restart: always
volumes:
- ./frontend:/app
- ./myceliasdk:/app/myceliasdk
backend:
image: bakuutin/mycelia-backend:dev
build:
context: .
dockerfile: ./backend/Dockerfile
expose:
- "5173"
restart: always
command: deno task ${BACKEND_TASK:-start}
env_file:
- .env
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
PYTHON_WORKER_URL: http://python-worker:8000
volumes:
- ./backend:/app
- ./myceliasdk:/myceliasdk
- ./docs:/docs:ro
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '0.2'
memory: 1G
python-worker:
image: bakuutin/mycelia-python:dev
build:
context: .
dockerfile: ./python/Dockerfile
environment:
MYCELIA_URL: http://backend:5173
volumes:
- ./python:/app
- ${WORKER_HOST_PATH:-worker_data}:/root/.cache
restart: always
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '0.5'
memory: 1G
nginx:
image: nginx:1.27-alpine
entrypoint: ["/nginx-entrypoint.sh"]
command: ["nginx", "-g", "daemon off;"]
ports:
- "4433:4433"
- "3210:80"
volumes:
- ./misc/nginx/templates:/etc/nginx/templates:ro
- ./misc/nginx/ssl:/etc/nginx/ssl
- ./misc/nginx/nginx-entrypoint.sh:/nginx-entrypoint.sh:ro
depends_on:
- frontend
- backend
restart: always
volumes:
redis_data:
mongo_data:
mongo_search_data:
worker_data: