Skip to content

Commit

Permalink
migratable devel
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Peter Voigt committed Sep 14, 2023
1 parent 0263157 commit 255cf5f
Show file tree
Hide file tree
Showing 4 changed files with 7,772 additions and 4,030 deletions.
10 changes: 10 additions & 0 deletions 40-create-ghcred.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#/bin/sh

# create nginx config from evironment
# *prevent envsubst from killing nginx vars with 'tr' and '@'*
cat <<EOT | envsubst | tr '@' '$' >/GH_OAUTH_CLIENT.conf
set @CLIENT_ID $CLIENT_ID;
set @CLIENT_SECRET $CLIENT_SECRET;
EOT

cat /config.json | jq --arg CLIENT_ID "$CLIENT_ID" '.repository += { "CLIENT_ID": $CLIENT_ID }' >/app/config.json
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ RUN apt-get update
RUN apt-get install -y jq
RUN mkdir /app
COPY src/config.json /
COPY nginx-ghcred/40-create-ghcred.sh /docker-entrypoint.d
COPY 40-create-ghcred.sh /docker-entrypoint.d
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
2 changes: 0 additions & 2 deletions nginx-ghcred/40-create-ghcred.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ cat <<EOT | envsubst | tr '@' '$' >/GH_OAUTH_CLIENT.conf
set @CLIENT_ID $CLIENT_ID;
set @CLIENT_SECRET $CLIENT_SECRET;
EOT

cat /config.json | jq --arg CLIENT_ID "$CLIENT_ID" '.repository += { "CLIENT_ID": $CLIENT_ID }' >/app/config.json
Loading

0 comments on commit 255cf5f

Please sign in to comment.