From 54b26f4b1c72b0a9e43c2e6153a2b7956e3c7a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Wa=C5=82achowski?= Date: Wed, 4 Jun 2025 18:42:39 +0200 Subject: [PATCH] cicd(docker,actions): action instantiating container based on compose.yaml --- .forgejo/workflows/deploy.yaml | 17 +++++++++++++++++ .gitignore | 1 + compose.yaml | 15 +++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .forgejo/workflows/deploy.yaml create mode 100644 .gitignore create mode 100644 compose.yaml diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml new file mode 100644 index 0000000..47f0993 --- /dev/null +++ b/.forgejo/workflows/deploy.yaml @@ -0,0 +1,17 @@ +name: Deploy with Docker Compose + +on: [push] + +jobs: + deploy: + runs-on: docker + container: + image: forgejo-actions-base:latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker Compose Down and Up + run: | + docker compose -p drawio down + docker compose -p drawio up -d --remove-orphans diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..823300f --- /dev/null +++ b/compose.yaml @@ -0,0 +1,15 @@ +version: '3.8' +services: + drawio: + image: jgraph/drawio + container_name: drawio + restart: unless-stopped + ports: + - "9002:8080" + networks: + - szymiserver + +networks: + szymiserver: + name: szymiserver + external: true