-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
100 lines (100 loc) · 2.48 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
# To clean up as much as possible excluding components that are in use, run this command:
# docker system prune -a
# docker volume prune
version: '3.8'
services:
database:
image: postgres:14.6-alpine
environment:
POSTGRES_DB: ssi_studio
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5433:5432
networks:
default:
aliases:
- "postgres.localhost"
volumes:
- postgres_data:/var/lib/postgresql/data
api:
container_name: nestjs_api
image: nestjs-api:1.0.0
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 3001:3000
volumes:
- ./backend:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- database
environment:
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DATABASE=ssi_studio
- PORT=3000
- MODE=DEV
- RUN_MIGRATIONS=false
- KEYCLOAK_URL=http://keycloak.localhost:8080
- KEYCLOAK_REALM=SSI-Studio
- KEYCLOAK_CLIENT_ID=angular-app
frontend:
container_name: angular
image: angular:1.0.0
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- 4201:80
volumes:
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf
restart: unless-stopped
depends_on:
- api
environment:
- KEYCLOAK_URL=http://keycloak.localhost:8080
- KEYCLOAK_REALM=SSI-Studio
- KEYCLOAK_CLIENT_ID=angular-app
pgadmin-compose:
container_name: pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "admin@dev.com"
PGADMIN_DEFAULT_PASSWORD: "admin"
ports:
- "16543:80"
depends_on:
- database
keycloak:
image: quay.io/keycloak/keycloak:20.0
environment:
DB_VENDOR: POSTGRES
DB_ADDR: database
DB_DATABASE: ssi_studio
DB_USER: postgres
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
JAVA_OPTS: -Dkeycloak.profile=preview -Dkeycloak.import=/opt/jboss/keycloak/imports/ssi-studio-realm.json
KEYCLOAK_LOGLEVEL: DEBUG
ROOT_LOGLEVEL: DEBUG
volumes:
- ./keycloak:/opt/jboss/keycloak/imports
command:
- start-dev
ports:
- 8080:8080
- 8443:8443
networks:
default:
aliases:
- "keycloak.localhost"
depends_on:
- database
volumes:
postgres_data: