-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
47 lines (43 loc) · 994 Bytes
/
docker-compose.yaml
File metadata and controls
47 lines (43 loc) · 994 Bytes
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
services:
postgres:
container_name: database
image: cleisonfmelo/postgres-pg-cron:latest
env_file: .env
ports:
- '${POSTGRES_PORT:-5432}:5432'
shm_size: 4gb
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-db:/docker-entrypoint-initdb.d
logging:
options:
max-size: 200m
redis:
container_name: redis
image: redis:6.2-alpine
env_file: .env
ports:
- '${REDIS_PORT:-6379}:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- redis_data:/data
logging:
options:
max-size: 200m
backend:
build:
context: .
dockerfile: Dockerfile
container_name: backend
command: uvicorn app:app --host 0.0.0.0 --port 8000
env_file: .env
ports:
- '${BACKEND_PORT:-8000}:8000'
depends_on:
- postgres
- redis
volumes:
redis_data:
driver: local
postgres_data:
driver: local