forked from IU-Capstone-Project-2025/InnoSync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (86 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
94 lines (86 loc) · 1.89 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
version: "3.8"
services:
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- backend_net
app:
build:
context: ./backend
dockerfile: Dockerfile
environment:
DB_URL: ${DB_URL}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
JWT_SECRET: ${JWT_SECRET}
ports:
- "8080:8080"
depends_on:
- postgres
networks:
- backend_net
frontend:
build:
context: ./frontend/innosync
dockerfile: Dockerfile
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
NODE_ENV: production
ports:
- "3000:3000"
depends_on:
- app
networks:
- backend_net
ml:
build: ./ML
ports:
- "8000:8000"
environment:
BACKEND_URL: ${BACKEND_URL}
env_file: ./ML/.env
restart: unless-stopped
depends_on:
- app
networks:
- backend_net
nginx:
image: nginx:stable-alpine
container_name: nginx_proxy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- /var/www/certbot:/var/www/certbot
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- frontend
- app
networks:
- backend_net
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- /var/www/certbot:/var/www/certbot
- /etc/letsencrypt:/etc/letsencrypt
entrypoint: >
/bin/sh -c 'trap exit TERM;
while :; do sleep 1d & wait $${!}; certbot renew; done'
networks:
- backend_net
volumes:
postgres_data:
networks:
backend_net:
driver: bridge