-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocker-compose.yml
More file actions
35 lines (32 loc) · 1.02 KB
/
Copy pathDocker-compose.yml
File metadata and controls
35 lines (32 loc) · 1.02 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
version: '3.8'
services:
# === THE BACKEND SERVICE ===
backend:
build:
context: ./note-nexus-backend
dockerfile: Dockerfile
ports:
- "8080:8080" # Map your machine's 8080 to container's 8080
volumes:
# ⚠️ CRITICAL FOR SQLITE PERSISTENCE ⚠️
# Map the local 'note.db' file into the container where the app expects it.
# If the file doesn't exist locally, Docker will create it as a directory, so...
# ENSURE note.db EXISTS LOCALLY BEFORE RUNNING (see step 4).
- ./note-nexus-backend/note.db:/root/note.db
networks:
- nexus-network
# === THE FRONTEND SERVICE ===
frontend:
build:
context: ./note-nexus-client
dockerfile: Dockerfile
ports:
- "80:80" # Map your machine's port 80 (standard HTTP) to container's 80
depends_on:
- backend # Wait for backend to start first
networks:
- nexus-network
# Create a private internal network for them to talk (good practice)
networks:
nexus-network:
driver: bridge