Switched images and adjusted pythonpath for celery container #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Production Deployment | ||
on: | ||
push: | ||
branches: | ||
- maintenance | ||
jobs: | ||
deploy: | ||
Check failure on line 9 in .github/workflows/production.yml GitHub Actions / Production DeploymentInvalid workflow file
|
||
name: Deploy images to production | ||
runs-on: ubuntu-latest | ||
needs: [nunaweb-proxy, nunaweb-server, nunaweb-web] | ||
env: | ||
SOURCE_FILE: "deployment/docker-compose.prod.yml" | ||
TARGET_DIR: "." | ||
steps: | ||
- name: Retrieve repository | ||
uses: actions/checkout@v3 | ||
- name: Copy docker-compose.yml file to host | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
key: ${{ secrets.SSH_KEY }} | ||
source: ${{ env.SOURCE_FILE }} | ||
target: ${{ env.TARGET_DIR }} | ||
strip_components: 1 | ||
- name: Pull new images from DockerHub | ||
uses: JimCronqvist/action-ssh@master | ||
with: | ||
hosts: '${{ secrets.SSH_TARGET }}' | ||
privatekey: ${{ secrets.SSH_KEY }} | ||
debug: false | ||
command: | | ||
mv docker-compose.prod.yml docker-compose.yml | ||
sed -r -i 's/(NS_MINIO_SECRET_KEY=).*$/\1${{ secrets.MINIO_PASSWORD }}/g' docker-compose.yml | ||
sed -r -i 's/(MINIO_ROOT_PASSWORD=).*$/\1${{ secrets.MINIO_PASSWORD }}/g' docker-compose.yml | ||
chmod 400 docker-compose.yml | ||
docker-compose stop | ||
docker-compose down | ||
docker rmi -f $(docker images -a -q) | ||
docker-compose up -d |