-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (62 loc) · 1.35 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3.7'
services:
app:
container_name: "smsgateway-app"
build: .
command: uvicorn app.main:app --host 0.0.0.0 --reload --workers 1
# command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uvicorn app.main:app --host 0.0.0.0'
volumes:
- .:/app
depends_on:
- db
ports:
- 8008:8000
env_file:
- .env
networks:
- BackendNetwork
db:
container_name: "smsgateway-db"
image: postgres:15-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
expose:
- 5432
restart: always
environment:
- POSTGRES_SERVER=${DB_SERVER}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
networks:
- BackendNetwork
pgadmin:
container_name: "smsgateway-pgadmin"
image: dpage/pgadmin4
ports:
- 5050:5050
depends_on:
- db
env_file:
- .env
networks:
- BackendNetwork
redis:
image: redis:latest
container_name: 'smsgateway-redis'
hostname: redis
restart: 'always'
networks:
- BackendNetwork
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 30s
timeout: 10s
retries: 3
expose:
- 6379
networks:
BackendNetwork:
name: BackendNetwork
volumes:
postgres_data: