Skip to content

Commit

Permalink
nginx build for maintenance page
Browse files Browse the repository at this point in the history
  • Loading branch information
popenc committed Sep 5, 2024
1 parent 2c5634f commit 9de8eaa
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,40 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: config=nginx-dev.conf

build-nginx-mp:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: build-angular
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.NGINX_IMAGE }}
tags: |
type=raw,value=ceam
- name: Build and push Cyanweb Nginx Docker image
uses: docker/build-push-action@v2
with:
context: .
file: docker/nginx/Dockerfile_MP
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-redis:
runs-on: ubuntu-latest
permissions:
Expand Down
16 changes: 16 additions & 0 deletions docker/nginx/Dockerfile_MP.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# # Builds a small nginx image with static website
FROM nginx:stable-alpine3.19-slim

ARG config=nginx.conf

RUN apk update && \
apk upgrade --available

RUN rm -rf /usr/share/nginx/html/* && \
rm /etc/nginx/conf.d/default.conf

COPY ./docker/nginx/$config /etc/nginx/conf.d

# COPY --from=ghcr.io/usepa/cyanweb-angular:dev-kube /app/dist /usr/share/nginx/html

COPY ./docker/nginx/index_mp.html /usr/shar/nginx/html

0 comments on commit 9de8eaa

Please sign in to comment.