-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added frontend proxy, added translation logic for weblate to i18n
- Loading branch information
Showing
64 changed files
with
10,279 additions
and
4,143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,9 +77,6 @@ jobs: | |
- text: View CI | ||
url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
push_to_registry: | ||
strategy: | ||
matrix: | ||
registry: ['docker.pkg.github.com', 'ghcr.io'] | ||
needs: [build] | ||
name: Push Docker image to GitHub Packages | ||
runs-on: ubuntu-latest | ||
|
@@ -104,8 +101,7 @@ jobs: | |
raw=$(git branch -r --contains ${{ github.ref }}) | ||
branch=${raw##*/} | ||
echo BRANCH_NAME=$(echo -n "${branch}") >> $GITHUB_ENV | ||
echo "MATRIX_REGISTRY=$(echo "${{ matrix.registry }}" | awk '{print tolower($0)}')" >> $GITHUB_ENV | ||
echo "DOCKER_REGISTRY=$(echo "${{ matrix.registry }}/${{ github.repository }}" | awk '{print tolower($0)}')" >> $GITHUB_ENV | ||
echo "DOCKER_REGISTRY=$(echo "ghcr.io/${{ github.repository }}" | awk '{print tolower($0)}')" >> $GITHUB_ENV | ||
echo "DOCKER_IMAGE=$(echo "${{ github.repository }}" | awk -F / '{print tolower($2)}')" >> $GITHUB_ENV | ||
echo "REPO_NAME_WITHOUT_PREFIX"=$(echo "${{ github.repository }}" | sed "s/.*\///" | awk -F / '{print tolower($0)}') >> $GITHUB_ENV | ||
echo CLEAN_REF=$(echo "${GITHUB_REF_NAME#refs/heads/}") >> $GITHUB_ENV | ||
|
@@ -145,7 +141,6 @@ jobs: | |
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build_args: DOCKER_MATRIX=${{ env.MATRIX_REGISTRY }} | ||
- name: Hint about the Docker Image Tag if successfull | ||
if: ${{ success() }} | ||
run: | | ||
|
@@ -160,7 +155,7 @@ jobs: | |
echo "" >> $GITHUB_STEP_SUMMARY | ||
echo "- It seems that something has gone wrong" >> $GITHUB_STEP_SUMMARY | ||
- name: Microsoft Teams Fail Card | ||
if: ${{ (env.FAIL_WEBHOOK_SECRET != null) && (env.FAIL_WEBHOOK_SECRET != '') && (matrix.registry == 'ghcr.io') && (failure() || cancelled()) }} | ||
if: ${{ (env.FAIL_WEBHOOK_SECRET != null) && (env.FAIL_WEBHOOK_SECRET != '') && (failure() || cancelled()) }} | ||
uses: toko-bifrost/[email protected] | ||
with: | ||
github-token: ${{ github.token }} | ||
|
@@ -174,7 +169,7 @@ jobs: | |
- text: View CI | ||
url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
- name: Microsoft Teams Image Card | ||
if: ${{ (env.IMAGE_WEBHOOK_SECRET != null) && (env.IMAGE_WEBHOOK_SECRET != '') && (matrix.registry == 'ghcr.io') && success() }} | ||
if: ${{ (env.IMAGE_WEBHOOK_SECRET != null) && (env.IMAGE_WEBHOOK_SECRET != '') && success() }} | ||
uses: toko-bifrost/[email protected] | ||
with: | ||
github-token: ${{ github.token }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,46 @@ | ||
ARG DOCKER_MATRIX=ghcr.io | ||
FROM $DOCKER_MATRIX/onlineberatung/onlineberatung-nginx/onlineberatung-nginx:dockerimage.v.005-main | ||
COPY build /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
ARG NODE_VERSION=14.21.1 | ||
ARG PORT=80 | ||
|
||
FROM node:$NODE_VERSION as proxyBuild | ||
|
||
USER node | ||
WORKDIR /app | ||
COPY proxy /app | ||
|
||
ENV NODE_ENV=development | ||
ENV PORT=$PORT | ||
|
||
# Currently nothing to build inside | ||
# RUN npm run install | ||
# RUN npm run build | ||
# RUN rm /app/node_modules | ||
|
||
### | ||
# Build is done on github so no need for docker build | ||
#FROM node:$NODE_VERSION as frontendBuild | ||
# | ||
#USER node | ||
#WORKDIR /app | ||
#COPY . /app | ||
# | ||
#ENV NODE_ENV=development | ||
#ENV PORT=$PORT | ||
# | ||
#RUN npm install --ignore-scripts | ||
#RUN npm run build | ||
|
||
# Prod build | ||
FROM node:$NODE_VERSION | ||
|
||
USER node | ||
WORKDIR /app | ||
EXPOSE $PORT | ||
COPY --from=proxyBuild /app ./ | ||
COPY build /app/build | ||
|
||
ENV NODE_ENV=production | ||
ENV PORT=$PORT | ||
|
||
RUN npm install --ignore-scripts | ||
|
||
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.