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