Skip to content

Commit

Permalink
👷 build webdis Image
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredkiss3 committed Sep 12, 2024
1 parent 4f4a5c4 commit 06b5213
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
38 changes: 35 additions & 3 deletions .github/workflows/build-and-push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
workflow_dispatch:

jobs:
build-push:
name: Build and Push main image
build-push-web:
name: Build and Push web app
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down Expand Up @@ -57,4 +57,36 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: ghcr.io/fredkiss3/gh-next:latest,ghcr.io/fredkiss3/gh-next:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/fredkiss3/gh-next:latest
cache-to: type=inline
cache-to: type=inline

build-push-redis:
name: Build and Push Redis container
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REGISTRY_PAT }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.redis
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/fredkiss3/webdis:latest,ghcr.io/fredkiss3/webdis:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/fredkiss3/webdis:latest
cache-to: type=inline
6 changes: 3 additions & 3 deletions docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ WORKDIR /app
# ENV GITHUB_SECRET=$GITHUB_SECRET
# ENV GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN
# ENV REDIS_HTTP_URL=$REDIS_HTTP_URL
# ENV REDIS_HTTP_USERNAME=$REDIS_HTTP_USERNAME
# ENV REDIS_HTTP_PASSWORD=$REDIS_HTTP_PASSWORD
# ENV KV_PREFIX=$KV_PREFIX
ENV REDIS_HTTP_USERNAME=user
ENV REDIS_HTTP_PASSWORD=password


ENV NODE_ENV=production

Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile.redis
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nicolas/webdis:0.1.22

COPY webdis.json /etc/webdis.prod.json

0 comments on commit 06b5213

Please sign in to comment.