-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.dev.yaml
54 lines (53 loc) · 1.2 KB
/
compose.dev.yaml
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
version: '3.8'
services:
app:
container_name: frontend
build:
context: .
target: dev
# image: nextjs-dev
ports:
- "3000:3000"
env_file:
- .env
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://website_builder_saas:postgres@db:5432/website_builder_saas
depends_on:
- db
restart: unless-stopped
command: npm run docker:dev
volumes:
- .:/app
- /app/node_modules
- /app/.next
develop:
watch:
- path: ./package.json
action: rebuild
- path: ./next.config.js
action: rebuild
- path: ./package-lock.json
action: rebuild
- path: .
target: /app
action: sync
- action: sync
path: ./src
target: /app/src
ignore:
- node_modules/
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: website_builder_saas
POSTGRES_PASSWORD: postgres
POSTGRES_DB: website_builder_saas
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/create_tables.sql
volumes:
db: