-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (90 loc) · 1.98 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: "3"
services:
api:
image: mapapylife/api:latest
build: .
restart: unless-stopped
depends_on:
- postgres
- redis
environment:
- TZ=${TZ}
- WEB_CONCURRENCY=16
- FORWARDED_ALLOW_IPS=172.23.0.1, 172.23.0.6
- DB_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
networks:
default:
ipv4_address: 172.23.0.2
aliases:
- api
cron:
image: mapapylife/cron:latest
build: cron
restart: unless-stopped
depends_on:
- api
environment:
- TZ=${TZ}
- AUTH_TOKEN=${AUTH_TOKEN}
- DB_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
networks:
default:
ipv4_address: 172.23.0.3
aliases:
- cron
postgres:
image: postgres:15.3-alpine
restart: unless-stopped
environment:
- TZ=${TZ}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=/var/lib/postgresql/data
volumes:
- postgres-vol:/var/lib/postgresql/data
networks:
default:
ipv4_address: 172.23.0.4
aliases:
- postgres
redis:
image: redis:7-alpine
restart: unless-stopped
environment:
- TZ=${TZ}
volumes:
- redis-vol:/data
networks:
default:
ipv4_address: 172.23.0.5
aliases:
- redis
nginx:
image: nginx:1.23.4-alpine
restart: unless-stopped
depends_on:
- api
ports:
- "8080:80/tcp"
environment:
- TZ=${TZ}
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./static:/data/static:ro
networks:
default:
ipv4_address: 172.23.0.6
aliases:
- nginx
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.23.0.0/24
volumes:
postgres-vol:
redis-vol: