add nginx files

This commit is contained in:
Simon Larsen 2023-07-19 20:00:53 +01:00
parent 7882897466
commit dafcd001f7
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
3 changed files with 49 additions and 0 deletions

View File

@ -42,6 +42,30 @@ jobs:
${{steps.build_changelog.outputs.changelog}}
nginx-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
env:
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
steps:
- uses: actions/checkout@v3
with:
ref: release
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: npm run prerun
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
# Build and deploy accounts.
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
- run: sudo docker buildx create --use
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/nginx:$ONEUPTIME_VERSION --tag oneuptime/nginx:release --push -f ./Nginx/Dockerfile .
test-server-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest

View File

@ -6,6 +6,25 @@ on:
- "master"
jobs:
nginx-test-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
env:
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: npm run prerun
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
# Build and deploy accounts.
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
- run: sudo docker buildx create --use
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/nginx:$ONEUPTIME_VERSION-test --tag oneuptime/nginx:test --push -f ./Nginx/Dockerfile .
generate-build-number:
runs-on: ubuntu-latest

6
Nginx/Dockerfile.tpl Normal file
View File

@ -0,0 +1,6 @@
FROM nginx:1.23.3-alpine
USER root
# Install bash.
RUN apk update && apk add bash && apk add curl