1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

docker: Update for environment config for #86

- Change to default ports (less surprising)
- Drop `/con/` volume naming, never caught on
This commit is contained in:
James Hillyerd
2018-03-25 15:35:45 -07:00
parent ce2339ee9c
commit 86c8ccf9ea
4 changed files with 25 additions and 16 deletions

View File

@@ -20,6 +20,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
more enjoyable to work on.
- Renamed `themes` directory to `ui` and eliminated the intermediate `bootstrap`
directory.
- Docker build:
- Uses the same default ports as other builds; smtp:2500 http:9000 pop3:1100
- Uses volume `/config` for `greeting.html`
- Uses volume `/storage` for mail storage
## [v1.3.1] - 2018-03-10

View File

@@ -2,23 +2,30 @@
# Inbucket website: http://www.inbucket.org/
FROM golang:1.10-alpine
MAINTAINER James Hillyerd, @jameshillyerd
# Configuration (WORKDIR doesn't support env vars)
# Configuration
ENV INBUCKET_SRC $GOPATH/src/github.com/jhillyerd/inbucket
ENV INBUCKET_HOME /opt/inbucket
WORKDIR $INBUCKET_HOME
ENTRYPOINT ["/con/context/start-inbucket.sh"]
CMD ["/con/configuration/inbucket.conf"]
ENV INBUCKET_SMTP_DOMAINNOSTORE bitbucket.local
ENV INBUCKET_SMTP_TIMEOUT 30s
ENV INBUCKET_POP3_TIMEOUT 30s
ENV INBUCKET_WEB_UIDIR $INBUCKET_HOME/ui
ENV INBUCKET_WEB_GREETINGFILE /config/greeting.html
ENV INBUCKET_WEB_COOKIEAUTHKEY secret-inbucket-session-cookie-key
ENV INBUCKET_STORAGE_TYPE file
ENV INBUCKET_STORAGE_PARAMS path:/storage
ENV INBUCKET_STORAGE_RETENTIONPERIOD 72h
ENV INBUCKET_STORAGE_MAILBOXMSGCAP 300
# Ports: SMTP, HTTP, POP3
EXPOSE 10025 10080 10110
EXPOSE 2500 9000 1100
# Persistent Volumes, following convention at:
# https://github.com/docker/docker/issues/9277
# NOTE /con/context is also used, not exposed by default
VOLUME /con/configuration
VOLUME /con/data
# Persistent Volumes
VOLUME /config
VOLUME /storage
WORKDIR $INBUCKET_HOME
ENTRYPOINT "/start-inbucket.sh"
# Build Inbucket
COPY . $INBUCKET_SRC/

View File

@@ -3,7 +3,7 @@
# description: start inbucket (runs within a docker container)
CONF_SOURCE="$INBUCKET_HOME/defaults"
CONF_TARGET="/con/configuration"
CONF_TARGET="/config"
set -eo pipefail
@@ -18,7 +18,6 @@ install_default_config() {
fi
}
install_default_config "inbucket.conf"
install_default_config "greeting.html"
exec "$INBUCKET_HOME/bin/inbucket" $*

View File

@@ -35,10 +35,9 @@ set -x
mkdir -p "$bindir"
install inbucket "$bindir"
mkdir -p "$contextdir"
install etc/docker/defaults/start-inbucket.sh "$contextdir"
cp -r themes "$installdir/"
install etc/docker/defaults/start-inbucket.sh /
cp -r ui "$installdir/"
mkdir -p "$defaultsdir"
cp etc/docker/defaults/inbucket.conf "$defaultsdir"
cp etc/docker/defaults/greeting.html "$defaultsdir"
set +x