This repository was archived by the owner on Feb 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (92 loc) · 2.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
98 lines (92 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
93
94
95
96
97
98
version: '3.8'
services:
frontend:
build:
context: ./frontend
ports:
- "80:80"
- "443:443"
depends_on:
- backend
env_file:
- ./frontend/.env
volumes:
- /etc/letsencrypt:/etc/letsencrypt:ro
networks:
- app-network
postgres:
image: postgres:15
ports:
- "5433:5432" # Expose PostgreSQL on port 5433 since 5432 is used by PostgreSQL in the host
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=gardenplanner
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./gardenPlannerBackend
ports:
- "8000:8000"
volumes:
- ./gardenPlannerBackend:/app
- static_volume:/app/static
- media_volume:/app/media
env_file:
- ./gardenPlannerBackend/.env
environment:
- TZ=Europe/Istanbul
- DEBUG=True
- DB_NAME=gardenplanner
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_HOST=postgres
- DB_PORT=5432
- PYTHONUNBUFFERED=1
- FIREBASE_SERVICE_ACCOUNT_KEY=firebase-service-account.json
command: >
sh -c "python manage.py migrate &&
(python manage.py run_scheduler &) &&
python manage.py runserver 0.0.0.0:8000"
# run migrations, start scheduler in background, then start server
depends_on:
postgres:
condition: service_healthy
networks:
- app-network
mobile:
build:
context: ./MOBILE/CommunityGardenApp
ports:
- "19000:19000" # Expo
- "19001:19001" # Metro
- "19002:19002" # DevTools
- "8081:8081" # React Native Web
- "8082:8082" # Alternative port for tunnel
volumes:
- ./MOBILE/CommunityGardenApp:/app
- /app/node_modules
env_file:
- ./MOBILE/CommunityGardenApp/.env
environment:
- EXPO_DEVTOOLS_LISTEN_ADDRESS=0.0.0.0
- CI=1
command: >
sh -c "npm install -g @expo/ngrok@^4.1.0 && npx expo start --tunnel"
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
static_volume:
media_volume:
postgres_data: