-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch to recent rebar3 build for erlang/rebar3#1326 * Add docker-compose.yml * Update docs
- Loading branch information
Showing
7 changed files
with
121 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM alpine:3.4 | ||
|
||
COPY docker/zotonic.config /etc/zotonic/zotonic.config | ||
|
||
RUN apk add --no-cache ca-certificates bash curl make gcc musl-dev g++ bsd-compat-headers git imagemagick inotify-tools wget \ | ||
&& apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ \ | ||
erlang erlang-inets erlang-compiler erlang-crypto erlang-mnesia erlang-ssl erlang-stdlib erlang-public-key erlang-tools erlang-dev erlang-asn1 erlang-syntax-tools erlang-eunit erlang-parsetools erlang-snmp erlang-sasl erlang-xmerl erlang-erl-interface | ||
|
||
WORKDIR /opt/zotonic | ||
|
||
VOLUME /opt/zotonic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: '2' | ||
|
||
services: | ||
postgres: | ||
image: postgres:9.5 | ||
environment: | ||
POSTGRES_USER: zotonic | ||
volumes: | ||
- ./data:/data | ||
working_dir: /data | ||
|
||
zotonic: | ||
image: zotonic/zotonic-dev | ||
privileged: true | ||
links: | ||
- postgres | ||
volumes: | ||
- ./:/opt/zotonic | ||
ports: | ||
- 80:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
|
||
# If the command given is a zotonic command, pass it to zotonic; otherwise exec it directly. | ||
if [ -x "/opt/zotonic/src/scripts/zotonic-$1" ]; then | ||
set -x | ||
|
||
HOME=/tmp | ||
ZOTONIC_PIDFILE=/tmp/zotonic.pid | ||
ZOTONIC_CONFIG_DIR=/etc/zotonic | ||
|
||
export HOME ZOTONIC_PIDFILE ZOTONIC_CONFIG_DIR | ||
|
||
# Create the pid file and enable zotonic to write to it | ||
touch /run/zotonic.pid && chown zotonic /run/zotonic.pid | ||
|
||
# Insert password from environment variable into zotonic.config | ||
sed -i -e "s/{password, \"\"}/{password, \"${ZOTONIC_PASSWORD}\"}/" \ | ||
/etc/zotonic/zotonic.config | ||
|
||
exec /usr/bin/gosu zotonic /opt/zotonic/bin/zotonic "$@" | ||
else | ||
exec "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters