Skip to content

Commit

Permalink
Merge branch 'feat/ui-docker-container-builds' of https://github.com/…
Browse files Browse the repository at this point in the history
…ORCID/ORCID-Source into feat/ui-docker-container-builds
  • Loading branch information
amontenegro committed Dec 9, 2024
2 parents 37453e2 + 4de984c commit 60a1eff
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 52 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bld_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ jobs:
docker_name: orcid/registry/orcid-web-proxy
file: orcid-web-proxy/Dockerfile

- artifact_name: orcid-haprouter
docker_name: orcid/registry/orcid-haprouter
file: orcid-haprouter/Dockerfile

runs-on: ubuntu-latest
steps:
- name: git-checkout-ref-action
Expand Down
68 changes: 20 additions & 48 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ services:
profiles:
- build
networks:
custom_network:
ipv4_address: 10.20.0.2
extra_hosts:
- "dependencies:10.20.0.2"
- "redis:10.20.0.3"
- "postgres:10.20.0.4"
- "haprouter:10.20.0.5"
app:

redis:
image: orcid/registry/redis:7.2.5-alpine
Expand All @@ -28,13 +22,7 @@ services:
- db
- dev
networks:
custom_network:
ipv4_address: 10.20.0.3
extra_hosts:
- "dependencies:10.20.0.2"
- "redis:10.20.0.3"
- "postgres:10.20.0.4"
- "haprouter:10.20.0.5"
app:

postgres:
image: postgres:13.13-alpine3.19
Expand All @@ -51,58 +39,39 @@ services:
- db
- dev
networks:
custom_network:
ipv4_address: 10.20.0.4
extra_hosts:
- "dependencies:10.20.0.2"
- "redis:10.20.0.3"
- "postgres:10.20.0.4"
- "haprouter:10.20.0.5"
app:

haprouter:
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-haprouter:${TAG:-0.0.1}
build:
context: .
dockerfile: orcid-haprouter/Dockerfile
extra_hosts:
- "nowhere:127.0.0.1"
- "dependencies:10.20.0.2"
- "redis:10.20.0.3"
- "postgres:10.20.0.4"
- "haprouter:10.20.0.5"
environment:
POSTGRES_READ_FQDN_A: postgres
POSTGRES_READ_FQDN_B: nowhere
POSTGRES_READ_FQDN_C: nowhere
POSTGRES_WRITE_FQDN_A: postgres
POSTGRES_WRITE_FQDN_B: nowhere
POSTGRES_WRITE_FQDN_C: nowhere
SOLR_READ_FQDN_A: solr
SOLR_READ_FQDN_B: nowhere
SOLR_READ_FQDN_C: nowhere
SOLR_WRITE_FQDN_A: solr
SOLR_WRITE_FQDN_B: nowhere.local
SOLR_WRITE_FQDN_C: nowhere.local
env_file:
- orcid-haprouter/default.env
- orcid-haprouter/deployment.env
ports:
- 0.0.0.0:8888:1936 # stats
- 0.0.0.0:7432:7432 # solr read
- 0.0.0.0:7983:7983 # solr write
- 0.0.0.0:7983:7983 # solr read
- 0.0.0.0:6983:6983 # solr write
- 0.0.0.0:7432:7432 # postgres read
- 0.0.0.0:6432:6432 # postgres write
networks:
custom_network:
ipv4_address: 10.20.0.5
app:
profiles:
- dev
- ui

lb:
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-lb:${TAG:-0.0.1}
build:
context: .
dockerfile: orcid-lb/Dockerfile
ports:
- 0.0.0.0:9999:1936 # stats
- 0.0.0.0:80:80
- 0.0.0.0:443:443
networks:
app:
profiles:
- dev

Expand All @@ -116,6 +85,8 @@ services:
profiles:
- dev
- ui
networks:
app:

web_proxy:
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-web-proxy:${TAG:-0.0.1}
Expand All @@ -129,6 +100,8 @@ services:
- ./certs/dhparam.pem:/etc/nginx/certs/dhparam.pem:ro
- ${SSL_CERTIFICATE:-./certs/docker_dev.pem}:/etc/nginx/certs/docker.pem:ro
- ${SSL_CERTIFICATE_KEY:-./certs/docker_dev-key.pem}:/etc/nginx/certs/docker-key.pem:ro
networks:
app:
profiles:
- dev
- ui
Expand All @@ -153,16 +126,15 @@ services:
- ${DOCKER_DEV_ENV_FILE:-empty.env}
ports:
- 0.0.0.0:13100:8080
networks:
app:
profiles:
- dev
- ui

networks:
custom_network:
app:
driver: bridge
ipam:
config:
- subnet: 10.20.0.0/16

volumes:
postgres_data:
1 change: 1 addition & 0 deletions docker-entrypoint-initdb.d/1-dev-users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ CREATE USER orcid WITH PASSWORD 'orcid';
CREATE USER statistics WITH PASSWORD 'statistics';
CREATE USER orcidro WITH PASSWORD 'orcidro';
CREATE USER dw_user WITH PASSWORD 'dw_user';
CREATE USER pgc WITH PASSWORD 'pgc';

4 changes: 4 additions & 0 deletions docker-entrypoint-initdb.d/2-pgc-allow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

echo "host template1 pgc 0.0.0.0/0 trust" >> /var/lib/postgresql/data/pg_hba.conf

7 changes: 7 additions & 0 deletions docker-up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

docker compose --profile db up -d

sleep 20

docker compose --profile dev up -d
12 changes: 12 additions & 0 deletions orcid-haprouter/default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
POSTGRES_READ_FQDN_A=postgres
POSTGRES_READ_FQDN_B=localhost
POSTGRES_READ_FQDN_C=localhost
POSTGRES_WRITE_FQDN_A=postgres
POSTGRES_WRITE_FQDN_B=localhost
POSTGRES_WRITE_FQDN_C=localhost
SOLR_READ_FQDN_A=solr
SOLR_READ_FQDN_B=localhost
SOLR_READ_FQDN_C=localhost
SOLR_WRITE_FQDN_A=solr
SOLR_WRITE_FQDN_B=localhost
SOLR_WRITE_FQDN_C=localhost
1 change: 1 addition & 0 deletions orcid-haprouter/deployment.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty file that is written out by deployment systems
8 changes: 4 additions & 4 deletions properties/default.persistence.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ ORG_ORCID_PERSISTENCE_DB_READONLY_PASSWORD=orcidro
ORG_ORCID_PERSISTENCE_DB_READONLY_PREFERRED_TEST_QUERY=select 1
ORG_ORCID_PERSISTENCE_DB_READONLY_SHOW_SQL="false"
ORG_ORCID_PERSISTENCE_DB_READONLY_TEST_CONNECTION_ON_CHECKIN="true"
ORG_ORCID_PERSISTENCE_DB_READONLY_URL=jdbc:postgresql://postgres:5432/orcid
ORG_ORCID_PERSISTENCE_DB_READONLY_URL=jdbc:postgresql://haprouter:7432/orcid
ORG_ORCID_PERSISTENCE_DB_READONLY_USERNAME=orcidro
ORG_ORCID_PERSISTENCE_DB_SHOW_SQL="false"
ORG_ORCID_PERSISTENCE_DB_TEST_CONNECTION_ON_CHECKIN="true"
ORG_ORCID_PERSISTENCE_DB_URL=jdbc:postgresql://postgres:5432/orcid
ORG_ORCID_PERSISTENCE_DB_URL=jdbc:postgresql://haprouter:6432/orcid
ORG_ORCID_PERSISTENCE_DB_USERNAME=orcid
ORG_ORCID_PERSISTENCE_INTERNAL_API_DB_INITIAL_POOL_SIZE="1"
ORG_ORCID_PERSISTENCE_INTERNAL_API_DB_MAX_POOL_SIZE="3"
Expand All @@ -43,7 +43,7 @@ ORG_ORCID_PERSISTENCE_LIQUIBASE_ENABLED="false"
ORG_ORCID_PERSISTENCE_SOLR_ALLOW_COMPRESSION="true"
ORG_ORCID_PERSISTENCE_SOLR_CONNECTION_TIMEOUT="60000"
ORG_ORCID_PERSISTENCE_SOLR_MAX_RETRIES="1"
ORG_ORCID_PERSISTENCE_SOLR_READ_ONLY_URL=http://solr/solr
ORG_ORCID_PERSISTENCE_SOLR_READ_ONLY_URL=http://haprouter:7983/solr
ORG_ORCID_PERSISTENCE_TOGGLZ_CACHE_TTL="60000"
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_CLASS=org.postgresql.Driver
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_IDLE_CONNECTION_TEST_PERIOD="60"
Expand All @@ -55,7 +55,7 @@ ORG_ORCID_PERSISTENCE_TOGGLZ_DB_NUM_HELPER_THREADS="5"
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_PASSWORD=orcid
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_PREFERRED_TEST_QUERY=select 1
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_TEST_CONNECTION_ON_CHECKIN="true"
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_URL=jdbc:postgresql://postgres:5432/features
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_URL=jdbc:postgresql://haprouter:6432/features
ORG_ORCID_PERSISTENCE_TOGGLZ_DB_USERNAME=orcid

# sched ones
Expand Down

0 comments on commit 60a1eff

Please sign in to comment.