-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
49 lines (47 loc) · 1.46 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
49 lines (47 loc) · 1.46 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
services:
db:
image: postgres:18.3-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
POSTGRES_DB: ${POSTGRES_DB:-wytui}
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/app
- /app/node_modules
# Keep SvelteKit's generated output container-local so it never collides
# with the host's .svelte-kit (host tooling like `npm run check` and the
# container's Vite dev server each own their own copy).
- /app/.svelte-kit
- downloads:/downloads
- library:/media
ports:
- '5173:5173'
- '5555:5555'
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-devpassword}@db:5432/${POSTGRES_DB:-wytui}?schema=public
- AUTH_SECRET=${AUTH_SECRET:-dev-secret-please-change-in-production}
- AUTH_TRUST_HOST=true
- NODE_ENV=development
- ADMIN_USERNAME=${ADMIN_USERNAME:-}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
depends_on:
db:
condition: service_healthy
command: sh -c "npx prisma generate && npx prisma migrate deploy && npx prisma db seed && npm run dev -- --host 0.0.0.0"
volumes:
pgdata:
downloads:
library: