-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
84 lines (80 loc) · 2.6 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
# SPDX-FileCopyrightText: NOI Techpark <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
services:
bdp:
image: maven:3-eclipse-temurin-17-alpine
depends_on:
- db
env_file:
- .env
environment:
MAVEN_CONFIG: /var/maven/.m2
SERVER_PORT: ${SERVER_PORT}
SPRING_PROFILE: ${SPRING_PROFILE}
command: >
bash -c "mvn \\
-Duser.home=/var/maven \\
--also-make \\
--projects dto \\
--projects client \\
clean install \\
&& cd writer; mvn \\
-Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8990' \\
-Dmaven.tomcat.port=${SERVER_PORT} \\
-Duser.home=/var/maven \\
-Dspring.profiles.active=${SPRING_PROFILE} \\
clean spring-boot:run \\
"
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
- 8990:8990
volumes:
- maven-cache:/var/maven/.m2
- ./:/code
working_dir: /code
tty: true
# In case you had already one and changed some parameters here, docker-compose
# might reuse the existing one and not update your password, DB or role... so
# stop the containers and execute 'docker-compose rm -fv db' to get rid
# of cached databases...
db:
image: postgis/postgis:12-3.2-alpine
environment:
POSTGRES_DB: bdp
POSTGRES_USER: bdp
POSTGRES_PASSWORD: password
# Uncomment this lines, if you want to keep Postgres data on your local machine
#volumes:
# - ./tmp/postgres/data:/var/lib/postgresql/data
ports:
- "5555:5432"
# To start a local ninja instance along with the core, use `docker compose --profile full up`.
# It's then accessible on port 8991
ninja:
image: "ghcr.io/noi-techpark/it.bz.opendatahub.api.mobility-ninja/it.bz.opendatahub.api.mobility-ninja-app:latest"
depends_on:
- bdp
profiles:
- full
environment:
SERVER_PORT: 8991
NINJA_BASE_URL: http://localhost:8991
NINJA_HOST_URL: http://localhost:8991
NINJA_QUERY_TIMEOUT_SEC: 30
NINJA_RESPONSE_MAX_SIZE_MB: 100
SECURITY_ALLOWED_ORIGINS: "*"
KEYCLOAK_URL: ${KEYCLOAK_URL}
KEYCLOAK_SSL_REQUIRED: ${KEYCLOAK_SSL_REQUIRED}
KEYCLOAK_REALM: ${KEYCLOAK_REALM}
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID}
KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET}
LOG_APPLICATION_NAME: ninja
LOG_APPLICATION_VERSION: 0.0.0-local-dev
JDBC_URL: jdbc:postgresql://db:5432/bdp?currentSchema=intimev2,public
DB_USERNAME: bdp
DB_PASSWORD: password
ports:
- "8991:8991"
volumes:
maven-cache: