-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-gn-compose.yml
70 lines (62 loc) · 2.86 KB
/
docker-gn-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
# Copy from here
# https://git.cepal.org/geo/geo-facility-geonetwork/-/blob/main/docker-compose.yml
# These steps to push image to ECR
# aws ecr get-login-password --region ap-southeast-2 | docker login --username AWS --password-stdin 615645230945.dkr.ecr.ap-southeast-2.amazonaws.com
# docker tag IMAGE_ID 615645230945.dkr.ecr.ap-southeast-2.amazonaws.com/my-repository
# docker push 615645230945.dkr.ecr.ap-southeast-2.amazonaws.com/my-repository
#
# When running in dev env, you should uncomment build . instead of image from ECR
# MAKE sure you create a folder call gn4_data before start to avoid permission issue
volumes:
gn4_data:
driver: local
services:
geonetwork:
container_name: geonetwork4
build: .
user: "root"
# image: 615645230945.dkr.ecr.ap-southeast-2.amazonaws.com/raymond:latest
restart: always
volumes:
# mapping for h2 db only
- ./gn4_data:/opt/geonetwork/gn4data
# data dir need to be persist across restart, the
# -Dgeonetwork.data.dir -Dgeonetwork.config.dir argument is used to point and use this folder
- ./gn4_data/data:/opt/geonetwork/data:rw
- ./gn4_data/config:/opt/geonetwork/config:rw
- ./gn4_data/resources:/opt/geonetwork/resources:rw
env_file:
- .env
environment:
# If log is not working, add this to JAVA_OPTS to check what is going on -Dlog4j2.debug
JAVA_OPTS: >-
-Xms256m -Xmx2g
-Dspring.profiles.active=edge
-Daodn.geonetwork4.githubBranch=${GIT_BRANCH:-main}
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
-Dgeonetwork.data.dir=/opt/geonetwork/data
-Dgeonetwork.config.dir=/opt/geonetwork/config
-Dgeonetwork.resources.dir=/opt/geonetwork/resources
-Dgeonetwork.jeeves.configuration.overrides.file=/opt/geonetwork/WEB-INF/config-overrides.xml
-Dorg.aspectj.tracing.enabled=true
GN_CONFIG_PROPERTIES: >-
-Des.protocol=${ES_PROTOCOL:-https}
-Des.port=${ES_PORT:-9200}
-Des.host=${ES_HOST:-localhost}
-Des.url=${ES_PROTOCOL:-https}://${ES_HOST:-localhost}:${ES_PORT:-9200}
-Des.username=${ES_USERNAME:-elastic}
-Des.password=${ES_PASSWORD:-open-sesame}
KB_URL: ${KB_URL:-http://localhost:5601}
INDEXER_HOST: ${INDEXER_HOST:-http://localhost}
INDEXER_PORT: ${INDEXER_PORT:-8080}
INDEXER_APIKEY: ${INDEXER_APIKEY}
GEONETWORK_DB_TYPE: ${GEONETWORK_DB_TYPE:-h2}
GEONETWORK_DB_HOST: ${GEONETWORK_DB_HOST:-localhost}
GEONETWORK_DB_PORT: ${GEONETWORK_DB_PORT:-9001}
GEONETWORK_DB_NAME: ${GEONETWORK_DB_NAME:-~/gn4data/geonetwork}
GEONETWORK_DB_USERNAME: postgres
GEONETWORK_DB_PASSWORD: password
GEONETWORK_ROOTURL: ${GEONETWORK_HOST:-localhost}
GEONETWORK_PROTOCOL: ${GEONETWORK_PROTOCOL:-http}
# GEONETWORK_DB_CONNECTION_PROPERTIES: readOnly=true
network_mode: "host"