forked from magicuidesign/magicui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (39 loc) · 984 Bytes
/
docker-compose.yml
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
version: "3.7"
# For local development, only database is running
#
# docker-compose up -d
#
# https://github.com/vercel/next.js/blob/canary/examples/with-docker-compose/docker-compose.dev.yml
services:
app:
container_name: app
build:
context: .
dockerfile: dev.Dockerfile
volumes:
- .:/app
- /app/node_modules
- /app/.next
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/${POSTGRES_DB}?schema=public
env_file:
- .env.local
restart: always
depends_on:
- database
database:
container_name: database
restart: unless-stopped
image: postgres:latest
volumes:
- database_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
database_data: