Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit cd2f92a

Browse files
author
Alexander Wirt
committed
Use container DB host and split test/runtime entrypoint
1 parent 92b2dce commit cd2f92a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ ENV PASTE_CONFIG=/app/t/conf/paste.conf
1414

1515
CMD ["morbo", "-l", "http://0.0.0.0:3000", "app.psgi"]
1616

17+
# If CMD_TEST is set, run tests instead (used in CI)
18+
ENTRYPOINT ["/bin/sh", "-c", "if [ \"$CMD_TEST\" = \"1\" ]; then PASTE_CONFIG=${PASTE_CONFIG:-t/conf/paste.conf} prove -Ilib t; else exec \"$@\"; fi", "--"]
19+
1720
# vim: syntax=Dockerfile

docker-compose.deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
image: ghcr.io/formorer/paste.pl:${IMAGE_TAG:-latest}
66
environment:
77
PASTE_CONFIG: /app/paste.conf
8+
CMD_TEST: "0"
89
MOJO_LOG_LEVEL: info
910
DB_HOST: db
1011
DB_PORT: 5432

paste.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#currently only postgresql is supported
33

44
[database]
5-
dbname = paste
6-
dbuser = www-data
5+
dbname = paste;host=db;port=5432
6+
dbuser = paste
77
#may be empty
8-
dbpassword =
8+
dbpassword = paste
99

1010
[www]
11-
base_url = //paste.debian.net
11+
base_url = http://localhost:3000
1212

1313
[shorturl]
1414
base_url = http://frm.li

0 commit comments

Comments
 (0)