Skip to content

Postgres_Deploy

Postgres_Deploy #7

Workflow file for this run

name: Postgres_Deploy
on: workflow_dispatch
env:
DBS: "${{ vars.DEV_DB }},${{ vars.PROD_DB }}"
POSTGRES_USER: ${{ vars.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
DATABASE: ${{ vars.POSTGRES_DB }}
PGADMIN_DEFAULT_EMAIL: ${{ vars.PGADMIN_DEFAULT_EMAIL }}
PGADMIN_DEFAULT_PASSWORD: ${{ secrets.PGADMIN_DEFAULT_PASSWORD }}
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Reclaim cache directory
run: chown -R 1000:1000 $HOME/actions-runner/_work/Forum/Forum/configs/postgres
- name: Docker compouse DOWN old containers
run: docker compose -f docker-compose.db.yml down -v
- name: Docker compouse UP new containers
run: docker compose -f docker-compose.db.yml up -d --build
- name: Clean up old docker resources
run: |
docker container prune -f
docker image prune -f