-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
86 lines (79 loc) · 2.08 KB
/
compose.yml
File metadata and controls
86 lines (79 loc) · 2.08 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
services:
db:
image: mysql:8.0
restart: always
environment:
MYSQL_DATABASE: ${DB_NAME:?DB_NAME is required}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
TZ: Asia/Manila
ports:
- "127.0.0.1:3307:3306"
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
api:
build:
context: .
dockerfile: Dockerfile
image: wigglebop25/frostbyte-api:latest
restart: always
# ... rest of config
expose:
- "8080"
environment:
# --- Server Config ---
SERVER_PORT: 8080
TZ: Asia/Manila
# --- Database Connection ---
DB_HOST: db
DB_PORT: 3306
DB_USER: root
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
DB_NAME: ${DB_NAME:-frost_db}
# --- Security Keys ---
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required}
# --- Initial Seeder Passwords ---
SEED_ADMIN_PASSWORD: ${SEED_ADMIN_PASSWORD}
SEED_CASHIER_PASSWORD: ${SEED_CASHIER_PASSWORD}
SEED_CUSTOMER_PASSWORD: ${SEED_CUSTOMER_PASSWORD}
volumes:
- ./.env:/app/.env
# Certs removed: API runs in HTTP mode, Caddy handles HTTPS
depends_on:
db:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: wigglebop25/frostbyte-frontend:latest
restart: always
expose:
- "3000"
environment:
# SvelteKit adapter-node reads these at runtime for $env/dynamic/public
PUBLIC_API_URL: https://frostbyte-api.southeastasia.cloudapp.azure.com/api/v1
PUBLIC_WS_URL: wss://frostbyte-api.southeastasia.cloudapp.azure.com/ws
TZ: Asia/Manila
depends_on:
- api
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- frontend
- api
volumes:
db_data:
caddy_data:
caddy_config: