forked from kargig/divemap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
109 lines (103 loc) · 2.76 KB
/
docker-compose.dev.yml
File metadata and controls
109 lines (103 loc) · 2.76 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
version: '3.8'
services:
# Nginx reverse proxy for development
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: divemap_nginx
restart: always
ports:
- "80:80"
depends_on:
- frontend
- backend
networks:
- divemap_network
# Backend API with development settings
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: divemap_backend
restart: always
# No host port mapping - only accessible through nginx
ports: []
environment:
- DATABASE_URL=mysql+pymysql://${MYSQL_USER:-divemap_user}:${MYSQL_PASSWORD:-divemap_password}@db:3306/divemap
- SECRET_KEY=${SECRET_KEY:-your-secret-key-change-in-production}
- ALGORITHM=HS256
- ACCESS_TOKEN_EXPIRE_MINUTES=15
- REFRESH_TOKEN_EXPIRE_DAYS=30
- REFRESH_TOKEN_COOKIE_SECURE=false
- REFRESH_TOKEN_COOKIE_HTTPONLY=true
- REFRESH_TOKEN_COOKIE_SAMESITE=lax
- ENABLE_TOKEN_ROTATION=true
- ENABLE_AUDIT_LOGGING=true
- MAX_ACTIVE_SESSIONS_PER_USER=5
- ENVIRONMENT=development
- OPENAI_API_KEY=${OPENAI_API_KEY:-foobar}
- LLM_PROVIDER=${LLM_PROVIDER:-openai}
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}
- CORS_ORIGINS=http://localhost
- ALLOWED_ORIGINS=http://localhost
volumes:
- ./backend:/app
- ./uploads:/app/uploads
depends_on:
- db
networks:
- divemap_network
security_opt:
- no-new-privileges:true
read_only: false
command: ["/app/startup_dev.sh"]
# Frontend with development settings
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: divemap_frontend
restart: always
# No host port mapping - only accessible through nginx
ports: []
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost
- NODE_ENV=development
depends_on:
- backend
networks:
- divemap_network
security_opt:
- no-new-privileges:true
read_only: false
# Database
db:
build:
context: ./database
dockerfile: Dockerfile
container_name: divemap_db
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root_password}
- MYSQL_DATABASE=${MYSQL_DATABASE:-divemap}
- MYSQL_USER=${MYSQL_USER:-divemap_user}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-divemap_password}
volumes:
- mysql_data:/var/lib/mysql
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- divemap_network
security_opt:
- no-new-privileges:true
read_only: false
volumes:
mysql_data:
networks:
divemap_network:
driver: bridge