Giter VIP home page Giter VIP logo

Comments (1)

thehilll avatar thehilll commented on August 23, 2024 3

This is possible with some slight modifications. I could provide a pull request, but it does break some functionality noted below).

I am running the current version with postgres on ARM, but I don't know how to get mongo to work if you want to use that. To use it with postgres:

  • Clone the repo
git clone https://github.com/alerta/docker-alerta.git
cd docker-alerta
  • As far as I can tell the version of mongodb-org-shell used (4.2) does not have a pre-built binary for ARM64. I have found instructions to build it yourself, but that's a larger change to the Dockerfile. It also might be possible to use a newer version which I believe does have a pre-built ARM version, but I don't know.
  • Because I'm not using mongo I just commented out the lines in the Dockerfile and in docker-entrypoint.sh that depend on it:
diff --git a/Dockerfile b/Dockerfile
index 351ea18..044dc5d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -63,14 +63,14 @@ RUN curl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add - && \
     rm -rf /var/lib/apt/lists/*

 # hadolint ignore=DL3008
-RUN curl -fsSL https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - && \
-    echo "deb https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list && \
-    apt-get update && \
-    apt-get install -y --no-install-recommends \
-    mongodb-org-shell && \
-    apt-get -y clean && \
-    apt-get -y autoremove && \
-    rm -rf /var/lib/apt/lists/*
+#RUN curl -fsSL https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - && \
+#    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list && \
+#    apt-get update && \
+#    apt-get install -y --no-install-recommends \
+#    mongodb-org-shell && \
+#    apt-get -y clean && \
+#    apt-get -y autoremove && \
+#    rm -rf /var/lib/apt/lists/*

 COPY requirements*.txt /app/
 # hadolint ignore=DL3013
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 1f3cd8a..bdd3d24 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -89,7 +89,7 @@ echo Alerta WebUI  ${WEBUI_VERSION}

 nginx -v
 echo uwsgi $(uwsgi --version)
-mongo --version | grep MongoDB
+#mongo --version | grep MongoDB
 psql --version
 python3 --version
 /venv/bin/pip list
  • You can then build an image by specifying the platform to be ARM:
docker build \
  --platform=linux/arm64/v8 \
  --build-arg VCS_REF=(git rev-parse --short HEAD) \
  --build-arg BUILD_DATE=(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --build-arg VERSION=(cat VERSION) \
  -t alerta-web:20230906 .
  • You will now have this image on your machine, but you need to create a docker-compose.override.yml to use it rather than the one specified in docker-compose.yml:
version: '2.1'
services:
  web:
    image: alerta-web:20230906
  • At this point you can proceed as the README says:
docker-compose up -d

# and to see what is happening:
docker logs -f alerta_web_1

from docker-alerta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.