-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.36 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
name: next-express-postgres-docker
services:
web:
build:
context: .
dockerfile: Dockerfile
target: web
ports:
- "3001:3001"
depends_on:
- api
environment:
- NEXT_PUBLIC_API_URL=https://hello.dishyy.com/api
- BETTER_AUTH_URL=https://hello.dishyy.com/api
- BETTER_AUTH_SECRET=secret
restart: unless-stopped
api:
build:
context: .
dockerfile: Dockerfile
target: server
ports:
- "3002:3002"
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_URL=postgresql://postgres:password@postgres:5432/next-express-postgres-docker
- CORS_ORIGIN=https://hello.dishyy.com
- BETTER_AUTH_SECRET=secret
- BETTER_AUTH_URL=https://hello.dishyy.com/api
restart: unless-stopped
postgres:
image: postgres:17-alpine
container_name: next-express-postgres-docker-postgres
environment:
POSTGRES_DB: next-express-postgres-docker
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- next-express-postgres-docker_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
next-express-postgres-docker_postgres_data: