-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
88 lines (81 loc) · 1.99 KB
/
docker-compose.yaml
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
version: "3"
services:
nginx:
container_name: nginx
image: nginx:1.17
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./logs/nginx:/var/log/nginx
ports:
- 80:80
depends_on:
- frontend
- backend
backend:
container_name: backend
restart: unless-stopped
build:
context: backend
dockerfile: Dockerfile
env_file:
- .env
environment:
PYTHONPATH: .
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_USER}
volumes:
- ./backend:/app
- ./logs/backend:/logs
depends_on:
- postgres
frontend:
container_name: frontend
build:
context: frontend
dockerfile: Dockerfile
volumes:
- ./frontend/app:/app
ports:
- 3000:3000
environment:
NODE_ENV: development
CHOKIDAR_USEPOLLING: "true"
postgres:
container_name: postgres
image: postgres
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
keycloak:
container_name: keycloak
image: jboss/keycloak:12.0.4
environment:
DB_VENDOR: POSTGRES
DB_SCHEMA: public
DB_ADDR: keycloak_postgres
DB_DATABASE: ${KEYCLOAK_DB_DATABASE}
DB_USER: ${KEYCLOAK_DB_USER}
DB_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
KEYCLOAK_USER: ${KEYCLOAK_ADMIN_USERNAME}
KEYCLOAK_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
JDBC_PARAMS: "useSSL=false"
ports:
- 8080:8080
depends_on:
- keycloak_postgres
keycloak_postgres:
container_name: keycloak_postgres
image: postgres
volumes:
- keycloak_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${KEYCLOAK_DB_DATABASE}
POSTGRES_USER: ${KEYCLOAK_DB_USER}
POSTGRES_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
volumes:
postgres_data:
keycloak_postgres_data: