Skip to content

Commit 2cb5fa9

Browse files
authored
Merge pull request #1113 from Websoft9/update-listmonk-460cea6a
Update listmonk
2 parents 2ba046e + 0a3e684 commit 2cb5fa9

File tree

11 files changed

+55
-174
lines changed

11 files changed

+55
-174
lines changed

apps/listmonk/.env

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,35 @@
1-
W9_REPO=wordpress
2-
W9_DIST=community
3-
W9_VERSION=latest
1+
W9_REPO=listmonk/listmonk
2+
W9_DIST='community'
3+
W9_VERSION='latest'
4+
W9_POWER_PASSWORD='VZX7AFV1G0M!fHHe'
45

5-
W9_POWER_PASSWORD=1PrMxExC45LsCT
6+
W9_HTTP_PORT=9000
7+
W9_HTTP_PORT_SET='9001'
8+
W9_ID='listmonk'
69

7-
# Environments which for user settings when create application
8-
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
9-
W9_HTTP_PORT_SET=9001
10-
# W9_HTTPS_PORT_SET=9002
11-
# W9_DB_PORT_SET=3306
12-
# W9_SSH_PORT_SET=23
13-
W9_KEY_SET="dfsjdkjf77xjxcjcj"
14-
15-
#### -- Not allowed to edit below environments when recreate app based on existing data -- ####
16-
17-
W9_ID=listmonk
18-
19-
# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
20-
# Some container (e.g teleport) need HTTPS access, then need to set this pra
21-
W9_HTTP_PORT=80
22-
W9_HTTPS_PORT=81
2310

2411
W9_LOGIN_USER=admin
25-
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
26-
# this password can also use password file
2712
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
28-
W9_ADMIN_PATH="/wp-login"
29-
30-
# Container name's suffix must use one of the value
31-
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"
32-
33-
# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT, http(s)://IP:PORT
34-
W9_URL=internet_ip:$W9_HTTP_PORT
35-
# modifies W9_URL on init when it is true
36-
W9_URL_REPLACE=true
37-
38-
W9_URL_WITH_PORT=false
39-
13+
W9_DB_EXPOSE="postgresql"
14+
W9_URL='internet_ip:$W9_HTTP_PORT'
4015
W9_NETWORK=websoft9
4116

4217
#### ----------------------------------------------------------------------------------------- ####
4318

4419

45-
# Below environment is created by apphub
46-
47-
#W9_NAME=""
48-
#W9_RCODE=""
20+
# Below environment is created by listmonk: https://listmonk.app/docs/configuration/
21+
22+
LISTMONK_app__address=0.0.0.0:9000
23+
LISTMONK_db__user=postgres
24+
LISTMONK_db__password=$W9_POWER_PASSWORD
25+
LISTMONK_db__database=listmonk
26+
LISTMONK_db__host=$W9_ID-postgresql
27+
LISTMONK_db__port=5432
28+
LISTMONK_db__ssl_mode=disable
29+
LISTMONK_db__max_open=25
30+
LISTMONK_db__max_idle=25
31+
LISTMONK_db__max_lifetime=300s
32+
TZ="Etc/UTC"
33+
# If these (optional) are set during the first `docker compose up`, then the Super Admin user is automatically created.
34+
LISTMONK_ADMIN_USER=$W9_LOGIN_USER
35+
LISTMONK_ADMIN_PASSWORD=$W9_LOGIN_PASSWORD

apps/listmonk/Dockerfile

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/listmonk/Notes.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
# Appname
1+
# listmonk
2+
3+
- LISTMONK_app__address: 0.0.0.0:9000 is very important
4+
- Multiply languages: **Settings > General**
5+
6+
27
## FAQ

apps/listmonk/docker-compose.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,41 @@
1-
# image,docs: https://hub.docker.com/_/wordpress/
1+
# image,docs: https://github.com/knadh/listmonk/blob/master/docker-compose.yml
22

33
services:
44

5-
wordpress:
5+
app:
66
image: $W9_REPO:$W9_VERSION
77
container_name: $W9_ID
8+
hostname: listmonk.example.com
89
restart: unless-stopped
9-
#This is for access host from container
10-
# extra_hosts: ["host.docker.internal:host-gateway"]
11-
# command: |
12-
# /bin/bash -c "ping -c 3 host.docker.internal"
13-
logging:
14-
driver: "json-file"
15-
options:
16-
max-file: "5"
17-
max-size: 10m
18-
deploy:
19-
resources:
20-
limits:
21-
memory: 5g
22-
cpus: '0.7'
2310
ports:
24-
- $W9_HTTP_PORT_SET:80
25-
env_file: .env
11+
- $W9_HTTP_PORT_SET:9000
12+
env_file:
13+
- .env
14+
depends_on:
15+
- db
16+
command: [sh, -c, "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"]
2617
volumes:
27-
- wordpress:/var/www/html
28-
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini
18+
- listmonk:/listmonk/uploads:rw
2919

30-
mariadb:
31-
image: mariadb:10.4
32-
container_name: $W9_ID-mariadb
20+
db:
21+
image: postgres:17-alpine
22+
container_name: $W9_ID-postgresql
3323
restart: unless-stopped
34-
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
24+
healthcheck:
25+
test: ["CMD-SHELL", "pg_isready -U listmonk"]
26+
interval: 10s
27+
timeout: 5s
28+
retries: 6
3529
volumes:
36-
- mysql_data:/var/lib/mysql
30+
- postgres_data:/var/lib/postgresql/data
3731
environment:
38-
MYSQL_DATABASE: $W9_ID
39-
MYSQL_USER: $W9_ID
40-
MYSQL_PASSWORD: $W9_POWER_PASSWORD
41-
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD
32+
POSTGRES_USER: $LISTMONK_db__user
33+
POSTGRES_PASSWORD: $LISTMONK_db__password
34+
POSTGRES_DB: $LISTMONK_db__database
4235

4336
volumes:
44-
wordpress:
45-
mysql_data:
37+
listmonk:
38+
postgres_data:
4639

4740
networks:
4841
default:

apps/listmonk/src/after_up.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/listmonk/src/encrypt.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/listmonk/src/filelist

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/listmonk/src/get_version.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/listmonk/src/nginx-proxy.conf

Lines changed: 0 additions & 57 deletions
This file was deleted.

apps/listmonk/src/php_exra.ini

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)