generated from belgattitude/nextjs-monorepo-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (71 loc) · 1.8 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: "3.8"
services:
#
# BUILTKIT_PROGRESS=plain DOCKER_BUILDKIT=1 docker-compose build --force-rm --progress=plain workspaces-full-install
#
workspaces-full-install:
profiles:
- donotstart
stdin_open: true
build:
context: ./
dockerfile: Dockerfile
target: workspaces-full-install
builder:
profiles:
- donotstart
container_name: nextjs-monorepo-web-app_dev-build
stdin_open: true
build:
context: ./
dockerfile: Dockerfile
target: builder
web-app-dev:
# Service must be started explicitly with docker-compose up web-app
profiles:
- donotstart
container_name: nextjs-monorepo-web-app_dev
build:
context: ./
dockerfile: Dockerfile
target: web-app-dev
stdin_open: true
ports:
- target: 8000
published: 8000
protocol: tcp
volumes:
- .:/app/
- excluded_build:/app/apps/web-app/.next/
depends_on:
- db-main
db-main:
image: postgres:14-alpine
ports:
- target: 5432
published: 5432
protocol: tcp
environment:
- POSTGRES_DB=maindb
- POSTGRES_PASSWORD=!ChangeMe!
- POSTGRES_USER=nextjs
volumes:
- db_data:/var/lib/postgresql/data:rw
# you may use a bind-mounted host directory instead,
# so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
pgadmin:
container_name: life-art-pgadmin
image: dpage/pgadmin4
restart: always
environment:
- PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
- PGADMIN_DEFAULT_PASSWORD=admin
# - PGADMIN_CONFIG_SERVER_MODE='False'
ports:
- target: 80
published: 5555
protocol: tcp
volumes:
excluded_build:
db_data: