forked from TimLohrer/auth-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (44 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
47 lines (44 loc) · 1.35 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
services:
mongodb:
image: mongo:latest
container_name: auth-rs-mongodb
# ports:
# - "27017:27017" # Uncomment if you want to expose MongoDB to the host
volumes:
- mongodb_data:/data/db
# environment:
# - MONGO_INITDB_ROOT_USERNAME= optional -> has to be included in the backend mongo_uri variable if you use it
# - MONGO_INITDB_ROOT_PASSWORD= optional -> has to be included in the backend mongo_uri variable if you use it
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
backend:
image: timlohrer/auth-rs-backend:latest
container_name: auth-rs-backend
ports:
- "8000:8000"
depends_on:
mongodb:
condition: service_healthy
environment:
- DATABASE_URL=mongodb://mongodb:27017 # adjust if needed
- SYSTEM_EMAIL=admin@example.com
- SYSTEM_PASSWORD= # Create a strong system user password here
- PUBLIC_BASE_URL=https://auth.example.com
restart: unless-stopped
frontend:
image: timlohrer/auth-rs-frontend:latest
container_name: auth-rs-frontend
ports:
- "3000:3000"
depends_on:
- backend
environment:
- PUBLIC_API_URL=https://yourdomain.com/api
restart: unless-stopped
volumes:
mongodb_data:
driver: local