Fixes
This commit is contained in:
parent
418996447b
commit
882d398279
@ -1,21 +1,6 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
application:
|
|
||||||
image: ${DOCKER_REGISTRY?}/${DOCKER_NAMESPACE?}/application-${ENV?}:${TAG?}
|
|
||||||
environment:
|
|
||||||
- APP_ENV=prod
|
|
||||||
build:
|
|
||||||
context: ../
|
|
||||||
# platforms:
|
|
||||||
# - "linux/amd64"
|
|
||||||
# - "linux/arm64"
|
|
||||||
dockerfile: ./images/php/application/Dockerfile
|
|
||||||
target: ${ENV?}
|
|
||||||
args:
|
|
||||||
- BASE_IMAGE=${DOCKER_REGISTRY?}/${DOCKER_NAMESPACE?}/php-base-${ENV?}:${TAG?}
|
|
||||||
- APP_SSH_PASSWORD=${APP_SSH_PASSWORD?}
|
|
||||||
tty: true
|
|
||||||
php-fpm:
|
php-fpm:
|
||||||
image: ${DOCKER_REGISTRY?}/${DOCKER_NAMESPACE?}/php-fpm-${ENV?}:${TAG?}
|
image: ${DOCKER_REGISTRY?}/${DOCKER_NAMESPACE?}/php-fpm-${ENV?}:${TAG?}
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -50,6 +50,16 @@ jobs:
|
|||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
|
- name: Init PROD
|
||||||
|
run: |
|
||||||
|
make make-init ENVS="ENV=prod TAG=2.2-amd64"
|
||||||
|
make docker-compose-init
|
||||||
|
- name: Build Images
|
||||||
|
run: |
|
||||||
|
make docker-compose-build
|
||||||
|
- name: Push Images
|
||||||
|
run: |
|
||||||
|
make docker-compose-push
|
||||||
- name: Clean Up
|
- name: Clean Up
|
||||||
run: |
|
run: |
|
||||||
make docker-compose-clean
|
make docker-compose-clean
|
||||||
@ -101,100 +111,10 @@ jobs:
|
|||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
- name: Clean Up
|
- name: Init PROD
|
||||||
run: |
|
|
||||||
make docker-compose-clean
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
||||||
Build-On-Amd64:
|
|
||||||
dependsOn:
|
|
||||||
- Run-Tests-On-Amd64
|
|
||||||
runs-on: amd64
|
|
||||||
steps:
|
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
|
||||||
- name: Clean Up
|
|
||||||
run: |
|
|
||||||
if [[ $(docker ps -q|wc -l) -gt 0 ]]
|
|
||||||
then
|
|
||||||
docker ps -aq | xargs docker rm -f
|
|
||||||
fi
|
|
||||||
#docker system prune -af --volumes
|
|
||||||
- name: Init
|
|
||||||
run: |
|
run: |
|
||||||
make make-init ENVS="ENV=prod TAG=2.2-amd64"
|
make make-init ENVS="ENV=prod TAG=2.2-amd64"
|
||||||
make docker-compose-init
|
make docker-compose-init
|
||||||
- name: Build Application Image
|
|
||||||
run: |
|
|
||||||
make docker-compose-build DOCKER_SERVICE_NAME=application
|
|
||||||
- name: Run Application Image
|
|
||||||
run: |
|
|
||||||
make docker-compose-up DOCKER_SERVICE_NAME=application
|
|
||||||
- name: Run Composer Install
|
|
||||||
run: |
|
|
||||||
chmod -R 0777 src/new
|
|
||||||
make composer ARGS="install"
|
|
||||||
- name: Run Assets Install and Build
|
|
||||||
run: |
|
|
||||||
make console ARGS="importmap:install"
|
|
||||||
make console ARGS="asset-map:compile"
|
|
||||||
- name: Generate Token
|
|
||||||
run: |
|
|
||||||
make console ARGS="lexik:jwt:generate-keypair"
|
|
||||||
- name: Build Images
|
|
||||||
run: |
|
|
||||||
make docker-compose-build
|
|
||||||
- name: Push Images
|
|
||||||
run: |
|
|
||||||
make docker-compose-push
|
|
||||||
- name: Clean Up
|
|
||||||
run: |
|
|
||||||
make docker-compose-clean
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
||||||
Build-On-Arm64:
|
|
||||||
dependsOn:
|
|
||||||
- Run-Tests-On-Arm64
|
|
||||||
runs-on: arm64
|
|
||||||
steps:
|
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
|
||||||
- name: Clean Up
|
|
||||||
run: |
|
|
||||||
if [[ $(docker ps -q|wc -l) -gt 0 ]]
|
|
||||||
then
|
|
||||||
docker ps -aq | xargs docker rm -f
|
|
||||||
fi
|
|
||||||
#docker system prune -af --volumes
|
|
||||||
- name: Init
|
|
||||||
run: |
|
|
||||||
make make-init ENVS="ENV=prod TAG=2.2-arm64v8"
|
|
||||||
make docker-compose-init
|
|
||||||
- name: Build Application Image
|
|
||||||
run: |
|
|
||||||
make docker-compose-build DOCKER_SERVICE_NAME=application
|
|
||||||
- name: Run Application Image
|
|
||||||
run: |
|
|
||||||
make docker-compose-up DOCKER_SERVICE_NAME=application
|
|
||||||
- name: Run Composer Install
|
|
||||||
run: |
|
|
||||||
chmod -R 0777 src/new
|
|
||||||
make composer ARGS="install"
|
|
||||||
- name: Run Assets Install and Build
|
|
||||||
run: |
|
|
||||||
make console ARGS="importmap:install"
|
|
||||||
make console ARGS="asset-map:compile"
|
|
||||||
- name: Generate Token
|
|
||||||
run: |
|
|
||||||
make console ARGS="lexik:jwt:generate-keypair"
|
|
||||||
- name: Build Images
|
- name: Build Images
|
||||||
run: |
|
run: |
|
||||||
make docker-compose-build
|
make docker-compose-build
|
||||||
@ -208,8 +128,8 @@ jobs:
|
|||||||
Merge:
|
Merge:
|
||||||
runs-on: amd64
|
runs-on: amd64
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Build-On-Amd64
|
- Run-Tests-On-Amd64
|
||||||
- Build-On-Arm64
|
- Run-Tests-On-Arm64
|
||||||
steps:
|
steps:
|
||||||
- name: Merge Images and Push
|
- name: Merge Images and Push
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user