-
Notifications
You must be signed in to change notification settings - Fork 31
/
docker-compose.yaml
52 lines (48 loc) · 1.01 KB
/
docker-compose.yaml
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
version: "3.9"
services:
medium_app:
container_name: medium_app
restart: always
volumes:
- .:/my_code
# - static_volume:/my_code/staticfiles
image: medium_app:latest
build: .
env_file:
- .env.example
ports:
- "8000:8000"
depends_on:
- medium_db_host
- medium_redis_host
networks:
medium_network:
medium_db_host:
container_name: medium_db_host
image: postgres:15-alpine
restart: always
env_file:
- .env.example
expose:
- "5432"
environment:
- POSTGRES_USER=${DB_USER-medium_user}
- POSTGRES_PASSWORD=${DB_PASSWORD-medium_user_password}
- POSTGRES_DB=${DB_NAME-medium_db}
networks:
- medium_network
medium_redis_host:
container_name: medium_redis_host
image: "redis:7-alpine"
env_file:
- .env.example
expose:
- "6379"
restart: always
networks:
- medium_network
networks:
medium_network:
name: medium_network
# volumes:
# static_volume: