Initial Commit
This commit is contained in:
commit
5ab38a2a72
21
Dockerfile
Normal file
21
Dockerfile
Normal 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
6
docker-compose.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
version: "3"
|
||||
services:
|
||||
postal:
|
||||
build: .
|
||||
image: postal
|
||||
container_name: postal
|
10
scripts/start.sh
Normal file
10
scripts/start.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user