1
mirror of https://gitlab.com/jessieh/simple-shortener.git synced 2024-09-07 23:31:45 +00:00

Move Docker workdir to filesystem root

This commit is contained in:
Jessie Hildebrandt 2021-12-21 02:03:58 -05:00
parent 191f8191a9
commit ab0e290e54
4 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@ FROM debian:buster-slim
LABEL maintainer='Jessie Hildebrandt <jessieh@jessieh.net>'
ENV PORT 80
WORKDIR /usr/simple-shortener
WORKDIR /simple-shortener
# Install required packages for building luarocks and lua rocks
RUN apt-get update && apt-get install --no-install-recommends -y \

View File

@ -48,7 +48,7 @@ ORDER BY created DESC")
;; Ensure 'db/' folder exists
(when (not (fs_utils.dir_exists? "db"))
(print "🚨 ERROR: No 'db/' folder to place SQLite database files in.\n❓ Did you forget to mount a volume at '/usr/simple-shortener/db?'")
(print "🚨 ERROR: No 'db/' folder to place SQLite database files in.\n❓ Did you forget to mount a volume at '/simple-shortener/db'?")
(os.exit -1))
;; ---------------------------------- ;;

View File

@ -43,7 +43,7 @@ OR last_active <= strftime('%s', 'now', '-" config.session_max_idle_length_hours
;; Ensure 'db/' folder exists
(when (not (fs_utils.dir_exists? "db"))
(print "🚨 ERROR: No 'db/' folder to place SQLite database files in.\n❓ Did you forget to mount a volume at '/usr/simple-shortener/db?'")
(print "🚨 ERROR: No 'db/' folder to place SQLite database files in.\n❓ Did you forget to mount a volume at '/simple-shortener/db'?")
(os.exit -1))
;; ---------------------------------- ;;

View File

@ -42,8 +42,8 @@
docker run -d \
-p 80:80 \
--env-file config.env \
--mount source=shortener-db,target=/usr/simple-shortener/db \
--mount type=bind,source=<strong>/PATH/TO/YOUR/SITE</strong>,target=/usr/simple-shortener/static/landing_page,readonly \
--mount source=shortener-db,target=/simple-shortener/db \
--mount type=bind,source=<strong>/PATH/TO/YOUR/SITE</strong>,target=/simple-shortener/static/landing_page,readonly \
jessiehildebrandt/simple-shortener
</code></pre>
<p><code>docker-compose</code> example<sup>1</sup>:</p>
@ -54,8 +54,8 @@ simple-shortener:
ports:
- 80:80
volumes:
- shortener-db:/usr/simple-shortener/db
- <strong>/PATH/TO/YOUR/SITE</strong>:/usr/simple-shortener/static/landing_page:ro
- shortener-db:/simple-shortener/db
- <strong>/PATH/TO/YOUR/SITE</strong>:/simple-shortener/static/landing_page:ro
volumes:
shortener-db: