feat: CI builds and pushes to DockerHub then restarts container via stack script
All checks were successful
Build, Push & Deploy / deploy (push) Successful in 4m46s
All checks were successful
Build, Push & Deploy / deploy (push) Successful in 4m46s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,26 +1,30 @@
|
|||||||
name: Deploy with Docker Compose
|
name: Build, Push & Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # adapte la branche que tu veux déployer
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: mac-orbstack-runner # le nom que tu as donné au runner
|
runs-on: mac-orbstack-runner
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Deploy stack
|
- name: Login to DockerHub
|
||||||
|
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
run: docker build -t julienfroidefond32/stripstream:latest .
|
||||||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
|
|
||||||
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
|
- name: Push to DockerHub
|
||||||
ADMIN_DEFAULT_PASSWORD: ${{ secrets.ADMIN_DEFAULT_PASSWORD }}
|
run: docker push julienfroidefond32/stripstream:latest
|
||||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
||||||
PRISMA_DATA_PATH: ${{ vars.PRISMA_DATA_PATH }}
|
- name: Pull new image and restart container
|
||||||
NODE_ENV: production
|
|
||||||
run: |
|
run: |
|
||||||
docker compose up -d --build
|
docker pull julienfroidefond32/stripstream:latest
|
||||||
|
cd /Users/julienfroidefond/Sites/docker-stack
|
||||||
|
./scripts/stack.sh up stripstream
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
stripstream-app:
|
stripstream-app:
|
||||||
|
image: julienfroidefond32/stripstream:latest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|||||||
Reference in New Issue
Block a user