-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (126 loc) · 3.94 KB
/
docker-compose.yml
File metadata and controls
135 lines (126 loc) · 3.94 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
version: '3.8'
# file structure
# .
# ├── frontend/
# │ └── Dockerfile
# ├── backend/
# │ └── Dockerfile
# └── docker-compose.yml
#
# docker-compose build
# docker-compose up
services:
eln-backend:
image: eln-backend
build:
context: ./backend
ports:
- "8010:8010"
environment:
# database
DB_USER: "test"
DB_PASSWORD: "test"
DB_TABLE: "eln"
DB_PORT: 5432
DB_ADDR: "eln-postgres"
# token
STATIC_ADMIN_TOKEN: "#super_secret#"
STATIC_WS_TOKEN: "super_ws_secret"
# keycloak integration
KEYCLOAK_INTEGRATION: "True"
KEYCLOAK_REALM_NAME: "joe"
KEYCLOAK_SERVER_URL: "http://wojians-macbook.local/auth"
KEYCLOAK_CLIENT_ID: "client_backend"
KEYCLOAK_CLIENT_SECRET: "cfAAazDMTwst5JgVVbtLjO5hsXQlTziL"
# typesense
TYPESENSE_HOST: "eln-typesense"
TYPESENSE_PORT: 8108
TYPESENSE_API_KEY: "#super_secret#"
# urls
APP_BASE_PATH: "http://wojians-macbook.local/" # with trailing slash
URL_BASE_PATH: "http://wojians-macbook.local/api/" # with trailing slash
WS_URL: "ws://wojians-macbook.local/ws/"
WS_PORT: 8011
ORIGINS: "*,http://localhost:4500,http://wojians-macbook.local"
command: ["uvicorn", "joeseln_backend.main:app", "--reload", "--port", "8010", "--host", "0.0.0.0", "--loop", "asyncio"]
volumes:
- ./data/pictures/:/data/pictures
- ./data/files/:/data/files
eln-backend-websocket:
image: eln-backend
build:
context: ./backend
ports:
- "8011:8011"
environment:
# database
DB_USER: "test"
DB_PASSWORD: "test"
DB_TABLE: "eln"
DB_PORT: 5432
DB_ADDR: "eln-postgres"
# token
STATIC_ADMIN_TOKEN: "#super_secret#"
STATIC_WS_TOKEN: "super_ws_secret"
# keycloak integration
KEYCLOAK_INTEGRATION: "True"
KEYCLOAK_REALM_NAME: "joe"
KEYCLOAK_SERVER_URL: "http://wojians-macbook.local/auth"
KEYCLOAK_CLIENT_ID: "client_backend"
KEYCLOAK_CLIENT_SECRET: "cfAAazDMTwst5JgVVbtLjO5hsXQlTziL"
# urls
APP_BASE_PATH: "http://wojians-macbook.local/" # with trailing slash
URL_BASE_PATH: "http://wojians-macbook.local/api/" # with trailing slash
WS_URL: "ws://wojians-macbook.local/ws/"
WS_PORT: 8011
ORIGINS: "*,http://localhost:4500,http://wojians-macbook.local"
WS_INTERNAL_IP: "0.0.0.0"
command: ["python", "-m", "joeseln_backend.ws.ws_server"]
eln-frontend:
image: eln-frontend
build:
context: ./frontend/
environment:
SERVER_NAME: "wojians-macbook.local" # optional
API_URL: "http://wojians-macbook.local/api" # without trailing slash
WS_URL: "ws://wojians-macbook.local/ws"
KEYCLOAK_URL: "http://wojians-macbook.local/auth"
KEYCLOAK_REALM: "joe"
KEYCLOAK_CLIENT_ID: "client_frontend"
KEYCLOAK_INTEGRATION: "true"
KEYCLOAK_BEHIND_NGINX: "true"
ports:
- "80:80"
- "443:443"
# bind certificates if enable HTTPS
# volumes:
# - "/path/to/cert:/etc/nginx/certs/server.crt"
# - "/path/to/key:/etc/nginx/certs/server.key"
eln-postgres:
image: postgres:13
environment:
POSTGRES_USER: "test"
POSTGRES_PASSWORD: "test"
POSTGRES_DB: "eln"
ports:
- "5432:5432"
volumes:
- ./data/postgres_data:/var/lib/postgresql/data
restart: unless-stopped
keycloak:
# ports:
# - 8080:8080
environment:
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
image: quay.io/keycloak/keycloak:26.1.4
volumes:
- ./data/keycloak_data:/opt/keycloak/data
command: start-dev --http-relative-path /keycloak --proxy-headers xforwarded --http-enabled=true
typesense:
image: typesense/typesense:27.1
ports:
- "8108:8108"
volumes:
- ./data/typesense_data:/data
command: --data-dir /data --api-key="#super_secret#" --enable-cors