Initial Commit

This commit is contained in:
ALinuxNinja 2017-04-26 16:35:49 -04:00
commit 5ab38a2a72
3 changed files with 37 additions and 0 deletions

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM ruby:2.4
## Install augeas
RUN apt-get -y update \
&& apt-get -y install augeas-lenses augeas-tools nodejs
## Install required gems
RUN gem install bundler && gem install procodile
## Create user for postal
RUN useradd -r -m -d /opt/postal -s /bin/bash postal
## Clone postal
RUN git clone https://github.com/atech/postal /opt/postal/app \
&& chown -R postal:postal /opt/postal/
## Install gems required by postal
RUN /opt/postal/app/bin/postal bundle /opt/postal/app/vendor/bundle
## Clean up apt
RUN rm -rf /var/lib/apt/lists/*

6
docker-compose.yml Normal file
View File

@ -0,0 +1,6 @@
version: "3"
services:
postal:
build: .
image: postal
container_name: postal

10
scripts/start.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
## Generate keys if they do not exist
if [[ ! -f /opt/postal/config/signing.key ]]; then
/opt/postal/app/bin/postal initialize-config
fi
## Use augeas to set the MySQL/RabbitMQ setup
## Run