Skip to content

Commit d924336

Browse files
committed
wip: adding config subpackage for nginx configs
Signed-off-by: Michelle McAveety <[email protected]>
1 parent 6e5bb24 commit d924336

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

apicurio-registry.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ environment:
1919
- go
2020
- icu
2121
- maven
22+
- nginx
2223
- nodejs-20
2324
- npm
2425
- openjdk-17-default-jdk
26+
- openssl
2527
environment:
2628
JAVA_HOME: /usr/lib/jvm/java-17-openjdk
2729

@@ -77,6 +79,28 @@ subpackages:
7779
mkdir -p ${{targets.contextdir}}/opt/app-root/src
7880
cp -r ui-app/dist/* ${{targets.contextdir}}/opt/app-root/src/
7981
82+
- name: ${{package.name}}-nginx-config
83+
description: nginx configuration files for upstream configuration
84+
pipeline:
85+
- runs: |
86+
# Configure certificate and key
87+
mkdir -p /etc/pki/nginx/private
88+
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/nginx/private/server.key -out /etc/pki/nginx/server.crt --batch
89+
chown -R 1001:0 /etc/pki/nginx/ && chmod 755 /etc/pki/nginx/private/server.key /etc/pki/nginx/server.crt
90+
91+
# Copy configuration scripts
92+
config_dest="${{targets.contextdir}}/usr/local/bin/"
93+
install -Dm644 -o 1001 -g 0 .docker-scripts/create-config.cjs "${config_dest}/create-config.cjs"
94+
install -Dm644 -o 1001 -g 0 .docker-scripts/update-base-href.cjs "${config_dest}/update-base-href.cjs"
95+
install -Dm644 -o 1001 -g 0 .docker-scripts/entrypoint.sh "${config_dest}/entrypoint.sh"
96+
install -Dm644 -o 1001 -g 0 .docker-scripts/nginx.conf "${{targets.contextdir}}/etc/nginx/nginx.conf"
97+
98+
# Copy dist files
99+
cp --chown=1001:0 dist/ ${{targets.contextdir}}
100+
101+
# Grant write permission to group
102+
chmod -R g+w /opt/app-root/src /usr/local/bin/
103+
80104
update:
81105
enabled: true
82106
github:

0 commit comments

Comments
 (0)