forked from vsilent/stackdog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (70 loc) · 1.63 KB
/
docker-compose.yml
File metadata and controls
76 lines (70 loc) · 1.63 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3.8'
volumes:
db_data:
driver: local
services:
stackdog:
container_name: stackdog
build:
context: .
dockerfile: docker/local/Dockerfile
target: development
entrypoint: ["/bin/sh", "-c"]
command:
- |
echo "Waiting for dependencies..."
sleep 5
echo "Starting Stackdog..."
cargo run --bin stackdog
ports:
- "${APP_PORT:-8080}:${APP_PORT:-8080}"
env_file:
- .env
environment:
- RUST_LOG=debug
- RUST_BACKTRACE=full
volumes:
- db_data:/app/db
- ./.env:/app/.env:ro
- ./src:/app/src:ro
- ./Cargo.toml:/app/Cargo.toml:ro
- ./migrations:/app/migrations:ro
restart: unless-stopped
networks:
- stackdog_network
# Optional: PostgreSQL (if you want to switch from SQLite)
# postgres:
# container_name: stackdog_postgres
# image: postgres:15-alpine
# environment:
# POSTGRES_USER: stackdog
# POSTGRES_PASSWORD: stackdog_password
# POSTGRES_DB: stackdog
# volumes:
# - postgres_data:/var/lib/postgresql/data
# ports:
# - "5432:5432"
# networks:
# - stackdog_network
# profiles:
# - postgres
# Optional: Adminer for database management
adminer:
container_name: stackdog_adminer
image: adminer:latest
ports:
- "8080:8080"
environment:
- ADMINER_DEFAULT_SERVER=postgres
profiles:
- adminer
networks:
- stackdog_network
depends_on:
- postgres
networks:
stackdog_network:
driver: bridge
# Uncomment to use PostgreSQL instead of SQLite
# volumes:
# postgres_data: