From addde1204477d73244eebb27e020bc94fd3e4006 Mon Sep 17 00:00:00 2001 From: ALinuxNinja Date: Thu, 27 Apr 2017 18:34:48 -0400 Subject: [PATCH] fix binding --- data/docker/webserver_bind.yml | 3 +++ docker-compose.yml | 3 +++ index.html | 36 ++++++++++++++++++++++++++++++++++ scripts/start.sh | 4 ++++ 4 files changed, 46 insertions(+) create mode 100644 data/docker/webserver_bind.yml create mode 100644 index.html diff --git a/data/docker/webserver_bind.yml b/data/docker/webserver_bind.yml new file mode 100644 index 0000000..6226c20 --- /dev/null +++ b/data/docker/webserver_bind.yml @@ -0,0 +1,3 @@ + +web_server: + bind_address: 0.0.0.0 diff --git a/docker-compose.yml b/docker-compose.yml index 24679e7..84dc663 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,8 +4,11 @@ services: build: . image: postal container_name: postal + ports: + - 80:5000 volumes: - ./data/postal:/opt/postal/config + - ./data/docker:/docker environment: - POSTAL_HOSTNAME=idontknow.nowhere.com - MYSQL_ROOT_PASSWORD=changeme diff --git a/index.html b/index.html new file mode 100644 index 0000000..6a3defc --- /dev/null +++ b/index.html @@ -0,0 +1,36 @@ + + + +Login - Postal + + + + + + + + +
+
+Welcome to Postal +
+ +
+
+ +

+

+ +
+ +
+ +
+ + diff --git a/scripts/start.sh b/scripts/start.sh index 7794b21..2a01ed0 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -6,6 +6,10 @@ cp -R /opt/postal/config-original/* /opt/postal/config ## Generate keys /opt/postal/bin/postal initialize-config +if [[ $(cat /opt/postal/config/postal.yml| grep -i web_server |wc -l) == 0 ]]; then + cat /docker/webserver_bind.yml >> /opt/postal/config/postal.yml +fi + ## Set Hostname sed -i "s/postal\.example\.com/$POSTAL_HOSTNAME/" /opt/postal/config/postal.yml