Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

feat: Create docker release

mr-karanbdc837d03f7c
diff --git a/.goreleaser.yml b/.goreleaser.yml
index d344779f..649d0bfd 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -27,3 +27,15 @@ archives:
- config.toml.sample
- README.md
- LICENSE
+dockers:
+ -
+ goos: linux
+ goarch: amd64
+ binaries:
+ - listmonk
+ image_templates:
+ - "knadh/listmonk:latest"
+ - "knadh/listmonk:{{ .Tag }}"
+ dockerfile: Dockerfile
+ extra_files:
+ - config.toml.sample
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..6b556921
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,6 @@
+FROM alpine:latest AS deploy
+RUN apk --no-cache add ca-certificates
+COPY listmonk /
+COPY config.toml.sample /etc/listmonk/config.toml
+VOLUME ["/etc/listmonk"]
+CMD ["./listmonk", "--config", "/etc/listmonk/config.toml"]
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 00000000..e093f315
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,42 @@
+# NOTE: This docker-compose.yml is meant to be just an example guideline
+# on how you can achieve the same. It is not intented to run out of the box
+# and you must edit the below configurations to suit your needs.
+
+version: "3.7"
+
+services:
+ db:
+ image: postgres:11
+ ports:
+ - "5432:5432"
+ volumes:
+ - type: volume
+ source: listmonk-data
+ target: /var/lib/postgresql/data
+ networks:
+ - listmonk
+ environment:
+ - POSTGRES_PASSWORD=listmonk
+ - POSTGRES_USER=listmonk
+ - POSTGRES_DB=listmonk
+ restart: unless-stopped
+
+ app:
+ restart: unless-stopped
+ depends_on:
+ - db
+ image: knadh/listmonk:latest
+ volumes:
+ - type: bind
+ source: ./config.toml
+ target: /etc/listmonk/config.toml
+ ports:
+ - "9000:9000"
+ networks:
+ - listmonk
+
+networks:
+ listmonk:
+
+volumes:
+ listmonk-data: