forked from gabe565/portfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
39 lines (36 loc) · 1.21 KB
/
docker-compose.dev.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
version: "3.9"
name: "sphincz-website-dev"
services:
backend:
container_name: "sphincz-website-backend-dev"
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8090:8090"
env_file:
- ./.env
volumes:
- ./pb_data:/data # Mount data directory for persistent data
- ./migrations:/app/migrations # Mount migrations directory for live updates
- ./internal:/app/internal # Mount internal code for live updates
- ./main.go:/app/main.go # Explicitly mount Go source files for live updates
environment:
- CGO_ENABLED=1
frontend:
container_name: "sphincz-website-frontend-dev"
build:
context: ./frontend
dockerfile: Dockerfile # Use the new frontend Dockerfile
volumes:
- ./frontend:/app # Mount the frontend source for live updates
- /app/node_modules # Avoid overriding node_modules
ports:
- "3000:3000" # Expose port 3000 for the frontend
env_file:
- ./.env
environment:
- VITE_API_ADDRESS=http://localhost:8090
- VITE_TURNSTILE_KEY=${VITE_TURNSTILE_KEY}
- NODE_ENV=development
command: npm run dev # Start the dev server with hot reloading