forked from 0-th/fastapi_production_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (46 loc) · 882 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
43
44
45
46
47
48
49
50
51
version: '3.7'
services:
app:
container_name: app
image: app_image
env_file:
- .env
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/src
ports:
- "16000:8000"
depends_on:
- app_db
app_db:
container_name: app_db
hostname: app_db
image: library/postgres:14.1
env_file:
- .env
volumes:
- app_pg_data:/var/lib/postgresql/data
- app_pg_data_backups:/backups
- ./scripts/postgres:/scripts
ports:
- "65432:5432"
app_redis:
image: redis:6.2-alpine
hostname: redis
container_name: app_redis
command:
- 'redis-server'
- '--requirepass myStrongPassword'
ports:
- 36379:6379
volumes:
app_pg_data:
driver: "local"
app_pg_data_backups:
driver: "local"
networks:
default:
external: true
name: app_main