-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from trenz-gmbh/feature/capsule-config
- Loading branch information
Showing
18 changed files
with
241 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
**/.git | ||
.github/ | ||
node_modules/ | ||
.env.local | ||
*.local.json | ||
Dockerfile* | ||
README.md |
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,5 +0,0 @@ | ||
VUE_APP_API_BASE=https://localhost:7262/api/ | ||
VUE_APP_PRIMARY_COLOR='#8af' | ||
VUE_APP_PRIMARY_FOREGROUND_COLOR='#000' | ||
VUE_APP_NAME='My Wiki' | ||
VUE_APP_USE_AUTH=false | ||
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# exit on error | ||
set -e | ||
|
||
# copy webapp settings | ||
cp public/webapp-settings.example.json webapp-settings.local.json | ||
|
||
# start server | ||
docker-compose up -d | ||
|
||
# test if the server is running and serves files | ||
requested_settings=$(curl http://localhost:5000/webapp-settings.json) | ||
|
||
# compare served file with actual file (a 404 or 50x error - or a timeout - would fail here) | ||
actual_settings=$(cat webapp-settings.local.json) | ||
if [ "$actual_settings" != "$requested_settings" ]; then | ||
echo "Could not verify server functionality. Received settings:" | ||
echo "$requested_settings" | ||
exit 1 | ||
fi | ||
|
||
echo "Received settings:" | ||
echo "$requested_settings" | ||
|
||
# test if homepage gets served without errors | ||
requested_homepage=$(curl http://localhost:5000/) | ||
echo "Received homepage:" | ||
echo "$requested_homepage" | ||
|
||
echo "Server seems to respond correctly." | ||
|
||
# shutdown server | ||
docker-compose down | ||
|
||
# cleanup | ||
rm webapp-settings.local.json | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
name: Build Docker Image | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Test docker-compose.yml | ||
run: chmod +x ./.github/scripts/docker-image-test.sh && ./.github/scripts/docker-image-test.sh | ||
shell: bash | ||
- name: Build and push image | ||
uses: docker/build-push-action@v3 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}:latest | ||
ghcr.io/${{ github.repository }}:${{ github.sha }} |
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "My Docs", | ||
"theme": { | ||
"primary": "80,120,200", | ||
"primary-foreground": "255,255,255" | ||
}, | ||
"api": { | ||
"baseUrl": "https://localhost:7262/api/" | ||
}, | ||
"useAuth": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export interface WebappSettings { | ||
name: string; | ||
theme: { | ||
primary: string; | ||
'primary-foreground': string; | ||
} | ||
api: { | ||
baseUrl: string; | ||
} | ||
useAuth: boolean; | ||
} |
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.