-
Notifications
You must be signed in to change notification settings - Fork 153
/
docker-compose-dev.yml
112 lines (104 loc) · 2.89 KB
/
docker-compose-dev.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '3.8'
services:
fastapi_server:
container_name: fastapi_server
build: ./backend
restart: always
command: "sh -c 'alembic upgrade head && uvicorn app.main:app --reload --workers 3 --host 0.0.0.0 --port 8000'"
#command: "sh -c 'alembic upgrade head && gunicorn -w 3 -k uvicorn.workers.UvicornWorker app.main:app --bind 0.0.0.0:8000 --preload --log-level=debug --timeout 120'"
volumes:
- ./backend/app:/code
expose:
- 8000
env_file: ".env"
depends_on:
- database
links:
- caddy_reverse_proxy:storage.localhost
database:
image: bitnami/postgresql
restart: always
container_name: database
env_file: ".env"
user: root
volumes:
- db_docker:/bitnami/postgresql
- ./create-dbs.sql:/docker-entrypoint-initdb.d/create-dbs.sql
ports:
- 5454:5432 # Remove this on production
expose:
- 5432
environment:
- POSTGRESQL_USERNAME=${DATABASE_USER}
- POSTGRESQL_PASSWORD=${DATABASE_PASSWORD}
- POSTGRESQL_DATABASE=${DATABASE_NAME}
redis_server:
image: redis:alpine
container_name: redis_server
restart: always
expose:
- 6379
env_file: .env
celery_worker:
container_name: celery_worker
restart: always
# platform: linux/arm64/v8
build: ./backend
command: "watchfiles 'celery -A app.core.celery worker -l info' "
volumes:
- ./backend/app:/code
# - "${EB_LOG_BASE_DIR}/php-app:/var/log/celery"
depends_on:
- database
- redis_server
env_file: .env
celery_beat: #Good for crontab and schedule tasks
container_name: celery_beat
restart: always
# platform: linux/arm64/v8
build:
context: ./backend
args:
INSTALL_DEV: ${INSTALL_DEV-false}
command: celery -A app.core.celery beat -l info -S celery_sqlalchemy_scheduler.schedulers:DatabaseScheduler -l info
volumes:
- ./backend/app:/code
# - "${EB_LOG_BASE_DIR}/php-app:/var/log/celery-beat"
depends_on:
- database
- redis_server
env_file: .env
minio_server:
image: minio/minio:latest
restart: always
container_name: minio_server
volumes:
- ./minio/data:/data
expose:
- 9000
- 9091
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
MINIO_BROWSER_REDIRECT_URL: http://stash.localhost
command: "server /data --console-address ':9090'"
caddy_reverse_proxy:
container_name: caddy_reverse_proxy
image: caddy:alpine
restart: always
ports:
- 80:80
- 443:443
environment:
- EXT_ENDPOINT1=${EXT_ENDPOINT1}
- LOCAL_1=${LOCAL_1}
- LOCAL_2=${LOCAL_2}
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./static:/code/static
- caddy_data:/data
- caddy_config:/config
volumes:
db_docker:
caddy_data:
caddy_config: