-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
47 lines (43 loc) · 1.08 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
39
40
41
42
43
44
45
46
47
version: '3.8'
services:
# Backend Service
api:
build: ./backend # Path to your backend code
container_name: sproutly-api
networks:
- sproutly-network
expose:
- "8000"
environment:
- API_HOST=0.0.0.0
- API_PORT=8000
# Frontend Service
frontend:
build:
context: ./frontend # Path to your frontend code
# dockerfile: Dockerfile # Ensure this is pointing to the correct Dockerfile for frontend
container_name: sproutly-frontend
ports:
- "3000:3000" # Expose React app at port 3000
networks:
- sproutly-network
depends_on:
- api
environment:
- REACT_APP_API_URL=http://sproutly-api:8000 # Backend URL for frontend to connect
# Nginx Service (acting as reverse proxy)
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf # Link custom Nginx configuration
networks:
- sproutly-network
depends_on:
- frontend
- api
networks:
sproutly-network:
driver: bridge