-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
81 lines (75 loc) · 1.99 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
services:
postgres:
image: postgres:latest
environment:
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "8081:80"
backend:
build:
context: ./backend
command: pnpm start:dev
environment:
- DATABASE_URL=postgresql://postgres:password@postgres:5432/postgres
- ALLOWED_ORIGINS=http://localhost:5173,http://localhost:8080,http://krakend:8080
- KEYCLOAK_BASE_URL=http://localhost:8082
- KEYCLOAK_REALM=referentiel-applications
depends_on:
- postgres
ports:
- "3500:3500"
volumes:
- ./backend:/app
- /app/node_modules
prisma-studio:
build:
context: ./backend
command: npx prisma studio
environment:
- DATABASE_URL=postgresql://postgres:password@postgres:5432/postgres
- ALLOWED_ORIGINS=http://localhost:5173,http://localhost:8080,http://krakend:8080
- KEYCLOAK_BASE_URL=http://localhost:8082
depends_on:
- postgres
ports:
- "5555:5555"
keycloak:
build:
context: ./keycloak
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=password
ports:
- 8082:8080
healthcheck:
test: "exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost:9000\r\nConnection: close\r\n\r\n' >&3;cat <&3 | grep -q '\"status\": \"UP\"' && exit 0 || exit 1"
interval: 5s
timeout: 10s
retries: 5
depends_on:
- postgres
client:
image: node:22
working_dir: /app
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5173:5173"
command: sh -c "npm install -g pnpm && pnpm install && pnpm dev"
depends_on:
- backend
krakend:
image: devopsfaith/krakend
ports:
- "8080:8080"
volumes:
- ./krakend.json:/etc/krakend/krakend.json