-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (39 loc) · 924 Bytes
/
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
services:
api:
build:
context: .
dockerfile: ./docker/Dockerfile
container_name: blog_api
command: uvicorn main:application_factory --workers 2 --host 0.0.0.0 --port 8001 --proxy-headers --forwarded-allow-ips='*'
ports:
- "8001:8001"
volumes:
- ./web/:/usr/src/
env_file:
- .env
mongodb:
image: mongo:7.0.7
restart: on-failure
container_name: blog_mongodb
env_file:
- .env
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
- mongodb_log:/var/log/mongodb
- ./mongo-entrypoint/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
redis:
image: redis:6-alpine
container_name: blog_redis
volumes:
- redis_data:/data
volumes:
mongodb_data:
driver: local
name: blog_mongodb_data
mongodb_log:
driver: local
name: blog_mongodb_log
redis_data:
name: blog_redis