Skip to content

Dockerize puppet-forge-server. It uses environmental variables if alv… #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:14.04

RUN apt-get update && \
apt-get -y upgrade

RUN useradd forge
RUN mkdir -p /opt/forge/log && \
mkdir -p /opt/forge/cache && \
mkdir -p /opt/forge/modules && \
chown -R forge /opt/forge

ENV FORGE_S3BUCKET='##AWS_BUCKET##'
ENV FORGE_AWS_SECRET='##AWS_SECRET_ACCESS_KEY##'
ENV FORGE_AWS_KEY='##AWS_ACCESS_KEY_ID##'
ENV FORGE_PORT=8080
ENV FORGE_LOGDIR=/opt/forge/log
ENV FORGE_CACHEDIR=/opt/forge/cache
ENV FORGE_PROXY='https://forgeapi.puppetlabs.com'
ENV FORGE_PIDFILE='/opt/forge/server.pid'
ENV FORGE_AWS_REGION='##AWS_REGION##'

RUN apt-get -y install ruby ruby-dev build-essential
RUN gem install aws-sdk

COPY puppet-forge-server-*.gem /
COPY Gemfile-dockerfile /Gemfile
RUN gem install bundle
RUN bundle install --gemfile=/Gemfile
RUN gem install --local /puppet-forge-server-*.gem

USER forge
ENTRYPOINT [ "puppet-forge-server" ]
12 changes: 12 additions & 0 deletions Gemfile-dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
source 'https://rubygems.org'

gem 'sinatra', '~> 1.4'
gem 'sinatra-contrib', '~> 1.4'
gem 'json', '~> 1.8'
gem 'rack-mount', '~> 0.8'
gem 'rack', '= 1.5.5'
gem 'open4', '~> 1.3'
gem 'open_uri_redirections', '~> 0.1'
gem 'haml', '~> 4.0'
gem 'deep_merge', '~> 1.0'
gem 'multipart-post', '~> 2.0.0'