-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (36 loc) · 1.1 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
services:
# Frontend service
frontend:
build:
context: .
dockerfile: frontend.dockerfile
container_name: frontend
restart: always
environment:
- NODE_ENV=production
- JWT_SECRET=487def17ca241bb783ed1fdcb9ebc7ef21dd87d180bd40fc8b6fddb2e839110c
env_file: .env
expose:
- "3000" # Only expose port 3000 within the Docker network
backend:
build:
context: .
dockerfile: backend.dockerfile
container_name: backend
restart: always
environment:
- NODE_ENV=production
- API_KEY=AIzaSyDjwwn1vo3g1KUV7p3stN2uq3_Vy6EKHZ8
expose:
- "4000" # Expose port 4000 within the Docker network
# Nginx reverse proxy for HTTP (and HTTPS later if needed)
nginx:
image: nginx:latest
container_name: nginx
restart: always
ports:
- "80:80" # Expose HTTP on port 80
- "443:443" # Placeholder for HTTPS on port 443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf # Mount Nginx config
- /etc/letsencrypt:/etc/letsencrypt # Mount Let's Encrypt SSL directory