-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdocker-compose-try-it.yaml
More file actions
171 lines (162 loc) · 4.62 KB
/
docker-compose-try-it.yaml
File metadata and controls
171 lines (162 loc) · 4.62 KB
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version: '3.8'
### WARNING: This is for local testing and development only. Do not use in production! ###
# Review carefully and change passwords and secrets before using in any other environment.
#
# Change:
# - POSTGRES_PASSWORD in the postgresql service
# - The kratos users password in initdb.sql / via psql
# - DSN environment variable in the kratos and kratos-migrate services
# - POSTGRES_PASSWORD environment variable in the devguard-api service
###
services:
postgresql:
image: ghcr.io/l3montree-dev/devguard/postgresql:v1.0.1
container_name: devguard-postgres
security_opt:
- no-new-privileges:true
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: change-me-definitely-when-not-testing
POSTGRES_DB: devguard
#ports:
# - "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres:/var/lib/postgresql/data
- ./initdb.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- devguard-local
kratos-migrate:
image: oryd/kratos:v25.4.0-distroless@sha256:368667ee3713797f86ddec669c36751f6484c7d675c78fd27c795b2e79271c31
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
depends_on:
postgresql:
condition: service_healthy
volumes:
- type: bind
source: ./kratos
target: /etc/config/kratos
environment:
- DSN=postgres://kratos:change-me-definitely-when-not-testing@postgresql:5432/kratos?sslmode=disable
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
networks:
- devguard-local
kratos:
image: oryd/kratos:v25.4.0-distroless@sha256:368667ee3713797f86ddec669c36751f6484c7d675c78fd27c795b2e79271c31
container_name: devguard-kratos
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
user: "53111"
depends_on:
postgresql:
condition: service_healthy
kratos-migrate:
condition: service_started
volumes:
- type: bind
read_only: true
source: ./kratos
target: /etc/config/kratos
#ports:
#- "4433:4433" # Public
#- "4434:4434" # Admin
environment:
- DSN=postgres://kratos:change-me-definitely-when-not-testing@postgresql:5432/kratos?sslmode=disable
- LOG_LEVEL=debug
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
networks:
- devguard-local
devguard-migrate:
image: ghcr.io/l3montree-dev/devguard:v1.0.1
read_only: true
tmpfs:
- /tmp:size=8G
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
user: "53111"
depends_on:
postgresql:
condition: service_healthy
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=change-me-definitely-when-not-testing
- POSTGRES_DB=devguard
- POSTGRES_HOST=postgresql
- POSTGRES_PORT=5432
- FRONTEND_URL=http://localhost:3000
command: ["devguard-cli", "migrate"]
networks:
- devguard-local
devguard-api:
image: ghcr.io/l3montree-dev/devguard:v1.0.1
container_name: devguard-api
read_only: true
tmpfs:
- /tmp:size=8G
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
user: "53111"
depends_on:
postgresql:
condition: service_healthy
kratos:
condition: service_started
devguard-migrate:
condition: service_completed_successfully
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgresql://postgres:password@postgresql:5432/devguard
- ORY_KRATOS_PUBLIC=http://kratos:4433
- ORY_KRATOS_ADMIN=http://kratos:4434
- LOG_LEVEL=debug
- INSTANCE_DOMAIN=http://localhost:8080
- FRONTEND_URL=http://localhost:3000
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=change-me-definitely-when-not-testing
- POSTGRES_DB=devguard
- POSTGRES_HOST=postgresql
- POSTGRES_PORT=5432
networks:
- devguard-local
devguard-web:
image: ghcr.io/l3montree-dev/devguard-web:v1.0.1
container_name: devguard-web
read_only: true
tmpfs:
- /tmp:size=100M
- /app/.next/cache:size=500M
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
depends_on:
- devguard-api
ports:
- "3000:3000"
environment:
- DEVGUARD_API_URL=http://devguard-api:8080
- ORY_SDK_URL=http://kratos:4433
- ORY_SDK_PUBLIC_URL=http://localhost:3000
networks:
- devguard-local
volumes:
postgres:
networks:
devguard-local:
name: devguard-local