Skip to content

remove public directory copy from Dockerfile #35

remove public directory copy from Dockerfile

remove public directory copy from Dockerfile #35

Workflow file for this run

name: Production - Build, Push, and Deploy Docker Compose
on:
push:
branches:
- main
jobs:
build-push-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Generate .env file
run: |
echo "POSTGRES_URL=${{ secrets.POSTGRES_URL }}" >> .env
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" >> .env
echo "DOMAIN=${{ secrets.DOMAIN }}" >> .env
- name: Build and Push Docker Images
run: |
echo "${{ secrets.REG_PASSWORD }}" | docker login ${{ secrets.REG_REGISTRY }} -u ${{ secrets.REG_USERNAME }} --password-stdin
docker compose build
docker compose push
- name: Deploy to Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd apps
mkdir uppy
cd uppy
rm -f .env
echo "POSTGRES_URL=${{ secrets.POSTGRES_URL }}" >> .env
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" >> .env
echo "DOMAIN=${{ secrets.DOMAIN }}" >> .env
curl -O -L https://raw.githubusercontent.com/nheek/uppy/main/docker-compose.yml
docker compose pull
docker compose up -d && curl -d "uppy deployed succesfully 🚀" https://ntfy.nheek.com/${{ secrets.NTFY_TOPIC }}