-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
80 lines (75 loc) · 2.19 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
x-shared-config:
app_common: &app_common
container_name: ranger_ims_server
# user: 1000:${DAEMON_GROUP_ID:-1420}
volumes:
- ./conf:/opt/ims/conf
environment:
IMS_DIRECTORY: "${IMS_DIRECTORY:-File}"
IMS_DIRECTORY_FILE: "${IMS_DIRECTORY_FILE:-/opt/ims/conf/directory.yaml}"
IMS_DB_HOST_NAME: "${IMS_DB_HOST_NAME:-ranger_ims_database}"
IMS_DB_DATABASE: "${IMS_DB_DATABASE:-ims}"
IMS_DB_USER_NAME: "${IMS_DB_USER_NAME:-ims}"
IMS_DB_PASSWORD: "${IMS_DB_PASSWORD:-ims}"
ports:
- ${IMS_SERVER_PORT:-8080}:8080
depends_on:
database:
condition: service_healthy
services:
app:
<<: *app_common
build:
context: .
command: >
sh -c "/opt/ims/bin/ims
--log-level=${IMS_SERVER_LOG_LEVEL:-info}
--log-file
-
--config
/opt/ims/conf/${IMS_SERVER_CONF_FILENAME:-imsd-docker-compose-sample.conf}
server"
dev:
<<: *app_common
build:
context: .
target: build
working_dir: /src/ims
develop:
watch:
- action: sync+restart
path: ./
target: /src/ims/
ignore:
- .venv/
command: >
sh -c "uv run ims
--log-level=${IMS_SERVER_LOG_LEVEL:-info}
--log-file
-
--config
/opt/ims/conf/${IMS_SERVER_CONF_FILENAME:-imsd-docker-compose-sample.conf}
server"
database:
# this should match the value in:
# https://github.com/burningmantech/ranger-ims-server/blob/master/src/ims/store/mysql/test/service.py
image: "${IMS_DB_IMAGE:-mariadb:10.5.24}"
container_name: ranger_ims_database
environment:
MARIADB_DATABASE: "${IMS_DB_DATABASE:-ims}"
MARIADB_USER: "${IMS_DB_USER_NAME:-ims}"
MARIADB_PASSWORD: "${IMS_DB_PASSWORD:-ims}"
MARIADB_ROOT_HOST: "${IMS_DB_ROOT_HOST:-%}"
MARIADB_ROOT_PASSWORD: "${IMS_DB_ROOT_PASSWORD:-ims-root}"
ports:
- ${IMS_DB_PORT:-3306}:3306
volumes:
- ./.docker/mysql/data/:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
networks:
default:
name: "${DOCKER_RANGERS_NETWORK:-rangers}"