forked from Aurora-Admin-Panel/deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (50 loc) · 1.45 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
version: '3.7'
services:
worker:
image: leishi1313/aurora-admin-backend:latest
restart: always
command: bash -c "while !</dev/tcp/postgres/5432; do sleep 1; done; celery -A tasks worker -B --loglevel=INFO -Q main-queue -c 5"
environment:
ENABLE_SENTRY: 'yes'
DATABASE_URL: 'postgresql://aurora:AuroraAdminPanel321@postgres:5432/aurora'
TRAFFIC_INTERVAL_SECONDS: 600
DDNS_INTERVAL_SECONDS: 120
volumes:
- $HOME/.ssh/id_rsa:/app/ansible/env/ssh_key
- app-data:/app/ansible/priv_data_dirs
depends_on:
- redis
backend:
image: leishi1313/aurora-admin-backend:latest
command: bash -c "while !</dev/tcp/postgres/5432; do sleep 1; done; alembic upgrade heads && python app/main.py"
environment:
PYTHONPATH: .
DATABASE_URL: 'postgresql://aurora:AuroraAdminPanel321@postgres:5432/aurora'
ENABLE_SENTRY: 'yes'
SECREY_KEY: 'AuroraAdminPanel321'
volumes:
- app-data:/app/ansible/priv_data_dirs
depends_on:
- postgres
- redis
nginx:
image: leishi1313/aurora-admin-frontend:latest
ports:
- 8000:80
depends_on:
- backend
redis:
image: redis
restart: always
postgres:
image: postgres:13-alpine
restart: always
environment:
POSTGRES_USER: aurora
POSTGRES_PASSWORD: AuroraAdminPanel321
POSTGRES_DB: aurora
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:
app-data: