-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (35 loc) · 1.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (35 loc) · 1.22 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
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "5173:5173" # Vite (frontend) default port
- "3000:3000" # Express (backend) port
volumes:
- .:/app # Mount the current directory into the container for live updates
- /app/node_modules # Exclude node_modules from the bind mount to prevent issues
- ./logs:/app/logs # Mount logs directory for persistent logging
environment:
# These variables are examples. You should replace them with your actual database credentials.
# In a real application, you would manage these securely (e.g., Docker secrets, .env files outside compose).
DATABASE_URL: postgres://user:password@db:5432/aetherquill
NODE_ENV: development
PORT: 3000
depends_on:
- db
# Use startup script that waits for DB and handles migrations
command: sh /app/scripts/startup.sh
db:
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: aetherquill
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- db_data:/var/lib/postgresql/data # Persistent data volume
volumes:
db_data: # Define the named volume for database persistence