forked from ZhFahim/anchor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
60 lines (57 loc) · 1.39 KB
/
docker-compose.dev.yml
File metadata and controls
60 lines (57 loc) · 1.39 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
services:
db:
image: postgres:18-alpine
container_name: anchor-db-dev
environment:
POSTGRES_USER: anchor
POSTGRES_PASSWORD: password
POSTGRES_DB: anchor
volumes:
- postgres_data_dev:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U anchor -d anchor" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
server:
build:
context: ./server
dockerfile: Dockerfile.dev
container_name: anchor-server-dev
depends_on:
db:
condition: service_healthy
ports:
- "3001:3001"
environment:
- NODE_ENV=development
- PORT=3001
- DATABASE_URL=postgresql://anchor:password@db:5432/anchor
- JWT_SECRET=supersecretkey
volumes:
- ./server:/app
- /app/node_modules
# Runs migrations and starts the app in watch mode
command: /bin/sh -c "pnpm prisma generate && pnpm prisma migrate deploy && pnpm run start:dev"
web:
build:
context: ./web
dockerfile: Dockerfile.dev
container_name: anchor-web-dev
depends_on:
server:
condition: service_healthy
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- SERVER_URL=http://server:3001
volumes:
- ./web:/app
- /app/node_modules
- /app/.next
volumes:
postgres_data_dev: