-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.47 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.47 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
version: '3.8'
services:
app:
build: .
ports:
- '${APP_PORT:-8181}:8081'
environment:
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/auth-boiler-plate?schema=public
- JWT_SECRET=change-this-secret-in-production
- JWT_EXPIRES_IN="1d"
- SMTP_HOST=mailhog
- SMTP_PORT=1025
- FRONTEND_URL=http://localhost:${APP_PORT:-8181}
- BACKEND_URL=http://localhost:${APP_PORT:-8181}
- NODE_ENV=development
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
depends_on:
postgres:
condition: service_healthy
mailhog:
condition: service_started
command: >
sh -c "bun install &&
bunx prisma migrate deploy &&
bunx prisma generate &&
bun run build &&
bun ./dist/infrastructure/http/server.js"
postgres:
image: postgres:15.5-alpine
platform: linux/arm64
ports:
- '${POSTGRES_PORT:-5532}:5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=auth-boiler-plate
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
mailhog:
image: jcalonso/mailhog:v1.0.1
platform: linux/arm64
ports:
- '${SMTP_PORT:-1125}:1025' # SMTP server
- '${MAILHOG_UI_PORT:-8125}:8025' # Web interface
volumes:
postgres_data: