From 6ffb1cf018cefb974f37f161d1c8ba563581357f Mon Sep 17 00:00:00 2001 From: Sander Hansen Date: Thu, 4 Jan 2024 17:12:34 +0100 Subject: [PATCH] Removed the seperate frontend Dockerfile, we always include it --- .../Dockerfile => Dockerfile | 2 +- MailerQ-Server/Dockerfile | 25 ------------------- README.md | 11 ++------ docker-compose/docker-compose.yaml | 4 +-- MailerQ-Server/mq-entry.sh => mq-entry.sh | 0 5 files changed, 5 insertions(+), 37 deletions(-) rename MailerQ-Server-Frontend/Dockerfile => Dockerfile (94%) delete mode 100644 MailerQ-Server/Dockerfile rename MailerQ-Server/mq-entry.sh => mq-entry.sh (100%) diff --git a/MailerQ-Server-Frontend/Dockerfile b/Dockerfile similarity index 94% rename from MailerQ-Server-Frontend/Dockerfile rename to Dockerfile index 639d18c..cffed0a 100644 --- a/MailerQ-Server-Frontend/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/mailerq-packages.gpg] ht RUN apt-get update && apt-get install -y mailerq-server mailerq-frontend && rm -rf /var/lib/apt/lists/* # copy our entry script to the machine -COPY ../MailerQ-Server/mq-entry.sh /usr/bin/mq-entry.sh +COPY mq-entry.sh /usr/bin/mq-entry.sh # run MailerQ server ENTRYPOINT ["/usr/bin/mq-entry.sh"] diff --git a/MailerQ-Server/Dockerfile b/MailerQ-Server/Dockerfile deleted file mode 100644 index ab78102..0000000 --- a/MailerQ-Server/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# use ubuntu 22.04 as a base -FROM ubuntu:22.04 -MAINTAINER Copernica BV - -# everything is non-interactive -ENV DEBIAN_FRONTEND=noninteractive - -# install the dependencies -RUN apt-get update && apt-get install -y gnupg ca-certificates libmysqlclient21 libxml2 && rm -rf /var/lib/apt/lists/* - -# download and install the gpg key -RUN gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mailerq-packages.gpg --keyserver keyserver.ubuntu.com --recv-keys 90DE523265E3563E - -# add the MailerQ repository -RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/mailerq-packages.gpg] https://packages.mailerq.com/debian jammy main" | tee /etc/apt/sources.list.d/mailerq-packages.list - -# install MailerQ server -RUN apt-get update && apt-get install -y mailerq-server && rm -rf /var/lib/apt/lists/* - -# copy our entry script to the machine -COPY mq-entry.sh /usr/bin/mq-entry.sh - -# run MailerQ server -ENTRYPOINT ["/usr/bin/mq-entry.sh"] -CMD rm -f /tmp/mailerq.pid && mailerq --lock=/tmp/mailerq.pid \ No newline at end of file diff --git a/README.md b/README.md index 28f1f39..9603f22 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ To use the Docker images, you need a MailerQ license key. If you already have a The easiest way to run MailerQ for the first time is to use our example [docker-compose.yaml](#docker-compose), as this includes the required RabbitMQ and MySQL instances and a minimal configuration file. ### Docker Compose -An example `docker-compose.yaml` is provided in the [docker-compose](https://github.com/CopernicaMarketingSoftware/mailerq-server-docker/tree/main/docker-compose) folder. Next to the docker-compose file, you'll find a minimal config that works out of the box with the example. The docker-compose is based on the MailerQ-Server-Frontend image, which makes the MailerQ management console available on [localhost:8080](http://localhost:8080). +An example `docker-compose.yaml` is provided in the [docker-compose](https://github.com/CopernicaMarketingSoftware/mailerq-server-docker/tree/main/docker-compose) folder. Next to the docker-compose file, you'll find a minimal config that works out of the box with the example. The docker-compose is based on the MailerQ-Server image, which makes the MailerQ management console available on [localhost:8080](http://localhost:8080). -To run docker-compose, you need to set the environment variable `LICENSE_KEY` on your host system with a valid MailerQ [license](#license). +To run docker-compose, you need to set the environment variable `MQ_LICENSE_KEY` on your host system with a valid MailerQ [license](#license). ### Docker File If you want to use the MailerQ images without using the docker-compose file, you need to make RabbitMQ and MySQL instances available for MailerQ. @@ -42,13 +42,6 @@ www-auth: hardcoded://mailerq:mailerq A requirement, next to the config file, is the MailerQ license key or file. You can either mount an existing license file or give the `LICENSE_KEY` environment variable to the Dockerfile so it can generate a license. #### Example -##### Without Management Console -```bash -docker build ./MailerQ-Server/ -t mailerq-server -docker run -e LICENSE_KEY= -v /path/to/minimal-config.txt:/etc/mailerq/config.txt mailerq-server -``` - -##### With Management Console ```bash docker build ./MailerQ-Server-Frontend/ -t mailerq-server-frontend docker run -e LICENSE_KEY= -v /path/to/minimal-config.txt:/etc/mailerq/config.txt mailerq-server diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index eb9dcfb..da557aa 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -43,11 +43,11 @@ services: container_name: mailerq # build the Dockerfile in the mailerq directory - build: ../MailerQ-Server-Frontend/ + build: ../ # pass on the MailerQ license key environment: - - LICENSE_KEY=${LICENSE_KEY} + - LICENSE_KEY=${MQ_LICENSE_KEY} # open up the port for the webinterface ports: diff --git a/MailerQ-Server/mq-entry.sh b/mq-entry.sh similarity index 100% rename from MailerQ-Server/mq-entry.sh rename to mq-entry.sh