-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (83 loc) · 2.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (83 loc) · 2.28 KB
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
version: "3.9"
services:
frontend:
build:
context: ./frontend
depends_on:
- backend
backend:
build:
context: ./backend
image: shortify-backend:latest # ✅ Named image for reuse
ports:
- "8000:8000"
env_file:
- ./backend/.env
depends_on:
- db
- redis
volumes:
- ./backend:/app
- ./backend/shortify-876e7-firebase-adminsdk-fbsvc-9193bebcff.json:/app/firebase-credentials.json
- ./backend/uploads:/app/uploads
- ./backend/assets:/app/assets
db:
image: postgres:15
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: hariom_715
POSTGRES_DB: Shortify
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:alpine
ports:
- "6379:6379"
celery:
image: shortify-backend:latest # ✅ Reuse backend image
command: celery -A app.core.celery_app worker --loglevel=info --pool=solo --queues=shorts
depends_on:
- backend
- redis
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- ./backend/shortify-876e7-firebase-adminsdk-fbsvc-9193bebcff.json:/app/firebase-credentials.json
- ./backend/uploads:/app/uploads
celery-beat:
image: shortify-backend:latest # ✅ Reuse backend image
command: celery -A app.core.celery_app beat --loglevel=info
depends_on:
- backend
- redis
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- ./backend/shortify-876e7-firebase-adminsdk-fbsvc-9193bebcff.json:/app/firebase-credentials.json
nginx:
image: nginx:latest
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf:/etc/nginx/conf.d
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
depends_on:
- frontend
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
command: certonly --webroot --webroot-path=/var/www/certbot --email singh.omhari715@gmail.com --agree-tos --no-eff-email --non-interactive -d kwixlab.com -d www.kwixlab.com
volumes:
db_data: {}