commit 85267399399288f385a0ae2f075b8f92a670054c Author: schmelczerandras Date: Wed Aug 12 10:52:09 2020 +0200 Copy everything diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3535a6b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +dist +target +package-lock.json +.* diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c1cb5ba --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +og-image.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..1ce43ad --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,49 @@ +name: Deploy everything +on: + push: + branches: + - main +env: + CONTAINER_REGISTRY: schmelczera + DOMAIN: "161.35.71.163" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout current branch with lfs + uses: actions/checkout@main + with: + lfs: true + + - name: Setup auth tokens + run: | + docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push job + run: | + docker build . -t $CONTAINER_REGISTRY/photos + docker push $CONTAINER_REGISTRY/photos + + push: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Checkout current branch with lfs + uses: actions/checkout@main + with: + lfs: true + + - name: Setup auth tokens + run: | + # SSH key + mkdir ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + chmod 400 ~/.ssh/id_ed25519 + ssh -o StrictHostKeyChecking=no root@$DOMAIN uptime + + - name: Stack deploy + run: | + DOCKER_HOST=ssh://root@$DOMAIN docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} + DOCKER_HOST=ssh://root@$DOMAIN docker stack deploy photos -c docker-compose.yml --with-registry-auth diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97122fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +dist +target +package-lock.json diff --git a/.idea/dictionaries/andras.xml b/.idea/dictionaries/andras.xml new file mode 100644 index 0000000..9528288 --- /dev/null +++ b/.idea/dictionaries/andras.xml @@ -0,0 +1,9 @@ + + + + andrás + imgs + schmelczer + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..4edf13e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/photos.iml b/.idea/photos.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/photos.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml new file mode 100644 index 0000000..7322fec --- /dev/null +++ b/.idea/watcherTasks.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..950017a --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +