update image
deploy / deploy (push) Failing after 5m2s
Details
deploy / deploy (push) Failing after 5m2s
Details
This commit is contained in:
parent
413b8c69ea
commit
72925ffd0c
|
@ -1,5 +1,4 @@
|
|||
Dockerfile
|
||||
.dockerignore
|
||||
LICENSE
|
||||
.gitea
|
||||
.git
|
||||
.git*
|
|
@ -6,15 +6,16 @@ on:
|
|||
- "v*[0-9].*[0-9].*[0-9]?(-rc?(.*[0-9])|-dev?(.*[0-9]))"
|
||||
- latest
|
||||
|
||||
env:
|
||||
REPOSITORY: dataheath/reactive-resume
|
||||
HOSTNAME: gitea.antoine-langlois.net
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container: docker:latest
|
||||
runs-on: debian-docker
|
||||
steps:
|
||||
- name: Set up NodeJS
|
||||
run: |
|
||||
apk update
|
||||
apk add nodejs npm
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
@ -31,48 +32,46 @@ jobs:
|
|||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: gitea.antoine-langlois.net
|
||||
registry: ${{ env.HOSTNAME }}
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Get latest version
|
||||
id: get_lts
|
||||
if: ${{ gitea.ref_name == 'latest' }}
|
||||
- name: Fetch remote repository
|
||||
id: fetch_version
|
||||
run: |
|
||||
apk add jq curl
|
||||
echo "version=$(curl -sfL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | jq .tag_name -r)" >> $GITHUB_OUTPUT
|
||||
apt-get install -y jq
|
||||
if [[ ${{ gitea.ref_name }} == 'latest' ]]; do \
|
||||
export VERSION=$(curl -sfL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | jq .tag_name -r); \
|
||||
else \
|
||||
export VERSION=${{ gitea.ref_name }}; \
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
# todo: uncomment when checkout support other git servers
|
||||
# uses: actions/checkout@v3
|
||||
run: |
|
||||
apk add git
|
||||
git clone --depth 1 --branch ${{ gitea.ref_name }} https://gitea.antoine-langlois.net/${{ gitea.repository }}.git .
|
||||
git clone --depth 1 --branch $VERSION https://github.com/AmruthPillai/Reactive-Resume.git app
|
||||
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push latest
|
||||
uses: docker/build-push-action@v4
|
||||
if: ${{ gitea.ref_name == 'latest' }}
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_lts.outputs.version }}
|
||||
push: true
|
||||
cache-to: type=inline
|
||||
cache-from: type=registry,ref=${{ env.REPOSITORY}}
|
||||
tags: |
|
||||
datahearth/reactive-resume:${{ steps.get_lts.outputs.version }}
|
||||
datahearth/reactive-resume:latest
|
||||
gitea.antoine-langlois.net/dataheath/reactive-resume:${{ steps.get_lts.outputs.version }}
|
||||
gitea.antoine-langlois.net/dataheath/reactive-resume:latest
|
||||
${{ env.REPOSITORY }}:${{ steps.get_version.outputs.version }}
|
||||
${{ env.REPOSITORY }}:latest
|
||||
${{ env.HOSTNAME }}/${{ env.REPOSITORY }}:${{ steps.get_version.outputs.version }}
|
||||
${{ env.HOSTNAME }}/${{ env.REPOSITORY }}:latest
|
||||
|
||||
- name: Build and push tag
|
||||
uses: docker/build-push-action@v4
|
||||
if: ${{ gitea.ref_name != 'latest' }}
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ gitea.ref_name }}
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
cache-from: type=registry,ref=${{ env.REPOSITORY }}:latest
|
||||
tags: |
|
||||
datahearth/reactive-resume:${{ gitea.ref_name }
|
||||
gitea.antoine-langlois.net/datahearth/reactive-resume:${{ gitea.ref_name }}
|
||||
${{ env.REPOSITORY }}:${{ steps.get_version.outputs.version }
|
||||
${{ env.HOSTNAME }}/${{ env.REPOSITORY }}:${{ steps.get_version.outputs.version }}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
app
|
13
Dockerfile
13
Dockerfile
|
@ -1,13 +1,8 @@
|
|||
FROM node:lts-bullseye-slim
|
||||
|
||||
ARG VERSION
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y git
|
||||
FROM mcr.microsoft.com/playwright:v1.35.1-jammy
|
||||
|
||||
RUN npm install -g pnpm pm2
|
||||
|
||||
RUN git clone --depth 1 --branch ${VERSION} https://github.com/AmruthPillai/Reactive-Resume.git /app
|
||||
COPY app /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
@ -15,9 +10,9 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
|||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm build
|
||||
RUN npx playwright install-deps
|
||||
RUN pnpm dlx playwright install --with-deps chromium
|
||||
|
||||
COPY .env /data/.env.template
|
||||
COPY .env.template /data/.env.template
|
||||
COPY entrypoint.sh /data/entrypoint.sh
|
||||
COPY ecosystem.config.js /data/ecosystem.config.js
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ module.exports = [
|
|||
script: "pnpm --filter server start",
|
||||
cwd: "/app",
|
||||
name: "server",
|
||||
max_restarts: 3,
|
||||
},
|
||||
{
|
||||
script: "pnpm --filter client start",
|
||||
cwd: "/app",
|
||||
name: "client",
|
||||
max_restarts: 3,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -4,8 +4,6 @@ if [ ! -f .env ]; then
|
|||
cp /data/.env.template .env
|
||||
fi
|
||||
|
||||
set -a
|
||||
source .env
|
||||
set +a
|
||||
export $(grep -v '^#' .env | xargs)
|
||||
|
||||
exec "$@"
|
Reference in New Issue