From 4c63782d19e1406ce6f268b5f2876b8f3bae393e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Godard?= Date: Mon, 6 Jan 2025 19:18:53 +0100 Subject: [PATCH] make: add CI to build dockerfile (#12) * make: add CI to build dockerfile * docs: add docker step in the readme --- .github/workflows/build.yaml | 29 +++++++++++++++++++++++++++++ README.md | 13 +++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..4e3aa64 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,29 @@ +on: + push: + branches: + - master +name: Build the docker container +jobs: + build: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + run: | + docker buildx build -f Dockerfile . --tag ghcr.io/${{ github.actor }}/arma-3-artillery-calculator:latest --platform linux/amd64,linux/arm64 --push diff --git a/README.md b/README.md index c783fff..662086b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ ARES is a web service to calculate the elevation, heading, and fire mode needed to precisely hit desired targets in Bohemia Interactive's **Arma 3**. When loading the web app, you get to choose between the classic artillery computer for the **2S9 Sochor** and **M4 Scorcher**, or, you are finally able to opt for the _**redneck artillery**_ version designed for the **MAAWS Mk4 Mod 0** – _Be the real King of the Hill!_ ### Get ARES + +#### Docker + +You need to have Docker or Podman installed and simply run: `docker run -p 8080:80 ghcr.io/Dreamfarer/arma-3-artillery-calculator:latest`. The interface will be accessible from `http://localhost:8080` or `http://your-server-ip:8080` + +Or you can build the container yourself: +```bash +docker build . -t ghcr.io/Dreamfarer/arma-3-artillery-calculator +docker run -p 8080:80 ghcr.io/Dreamfarer/arma-3-artillery-calculator +``` + +#### Bare + It is as simple as cloning this repository and double-clicking the `.html` file. However, there is yet a more convenient way: Head straight to the live version of this artillery calculator found [HERE](https://arma.openlink.bot/ares) – Free of charge and no nasty trackers nor advertisements! ### How to Use?