-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
149 lines (141 loc) · 4.05 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: "3.8"
services:
gateway:
image: starter_gateway
container_name: starter-gateway
restart: always
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/api_gateway.conf:/etc/nginx/api_gateway.conf
- ./docker/nginx/api_json_errors.conf:/etc/nginx/api_json_errors.conf
- ./docker/nginx/api_keys.conf:/etc/nginx/api_keys.conf
- ./docker/nginx/cors.conf:/etc/nginx/cors.conf
- ./docker/nginx/api_conf.d:/etc/nginx/api_conf.d
- ./docker/nginx/certificates/own-ca/starter.io.crt:/etc/ssl/certs/starter.io.crt
- ./docker/nginx/certificates/own-ca/starter.io.key:/etc/ssl/certs/starter.io.key
build:
context: ./docker/nginx
networks:
'starter-net':
aliases:
- "auth.starter.io"
- "app.starter.io"
- "starter.io"
ports:
- "443:443"
depends_on:
- database
- keycloak
- backend
database:
image: postgres:latest
container_name: starter-postgresql
restart: always
environment:
- POSTGRES_MULTIPLE_DATABASES=${BACKEND_POSTGRESQL_DB},${KEYCLOAK_POSTGRESQL_DB}
# - POSTGRES_DB=${BACKEND_POSTGRESQL_DB}
- POSTGRES_USER=${BACKEND_POSTGRESQL_USER}
- POSTGRES_PASSWORD=${BACKEND_POSTGRESQL_ROOT_PASSWORD}
volumes:
- ./database/initdb:/docker-entrypoint-initdb.d
- ./database/db-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- starter-net
keycloak:
image: starter_keycloak
container_name: starter-keycloak
restart: always
environment:
- KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN}
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD}
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://${BACKEND_POSTGRESQL_HOST}:5432/${KEYCLOAK_POSTGRESQL_DB}
- KC_DB_USERNAME=${BACKEND_POSTGRESQL_USER}
- KC_DB_PASSWORD=${BACKEND_POSTGRESQL_ROOT_PASSWORD}
- KC_HOSTNAME=auth.starter.io
# - KC_HOSTNAME_PORT=8080
- KC_HOSTNAME_STRICT=false
- KC_HOSTNAME_STRICT_HTTPS=true
- KC_HOSTNAME_STRICT_BACKCHANNEL=false
- KC_HTTP_PORT=8080
- KC_PROXY=edge
build:
context: ./docker/keycloak
command: start-dev --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false
# ports:
# - "8080:8080"
networks:
- starter-net
depends_on:
- database
backend:
image: starter_nestjs
container_name: starter-nestjs
restart: always
working_dir: /${BACKEND_WORKING_DIR}
volumes:
- .:/${BACKEND_WORKING_DIR}
- /${BACKEND_WORKING_DIR}/node_modules
environment:
- START_TYPE
- NODE_ENV
- BACKEND_WORKING_DIR
build:
context: .
command: pnpm run start:${START_TYPE}
ports:
# - "3000:3000"
- "9229:9229"
networks:
- starter-net
depends_on:
- database
- keycloak
networks:
starter-net:
# admin:
# frontend:
volumes:
pgdata:
# admin:
# image: starter-vue-admin
# container_name: starter_vue_admin
# restart: always
# working_dir: /${ADMIN_WORKING_DIR}
# volumes:
# - ./packages/admin:/${ADMIN_WORKING_DIR}
# - /${ADMIN_WORKING_DIR}/node_modules
# ports:
# - "8080:8080"
# - "9230:9229"
# networks:
# - admin
# environment:
# - START_TYPE
# - NODE_ENV
# - ADMIN_WORKING_DIR
# build:
# context: ./packages/admin
# command: yarn run dev
# frontend:
# image: starter-vue-frontend
# container_name: starter_vue_frontend
# restart: always
# working_dir: /${FRONTEND_WORKING_DIR}
# volumes:
# - ./packages/frontend:/${FRONTEND_WORKING_DIR}
# - /${FRONTEND_WORKING_DIR}/node_modules
# ports:
# - "9090:8080"
# - "9231:9229"
# networks:
# - frontend
# environment:
# - START_TYPE
# - NODE_ENV
# - FRONTEND_WORKING_DIR
# build:
# context: ./packages/frontend
# command: yarn run serve