Skip to content

Instantly share code, notes, and snippets.

Last active November 20, 2015 18:53
What would you like to do?
# A postgresql container to store all your dev dataz!
# cade/webmaker-postgres is a slightly customized version of the official Docker Hub postgres container
image: cade/webmaker-postgres
# Enable host networking for the container - effectively making th containers 'localhost' the same as the host
net: "host"
# Mounts the pg_data folder in this repo to the containers filesystem.
# cade/webmaker-postgres is configured to use /var/lib/postgresql/data/pg_data to store data
- ./pg_data:/var/lib/postgresql/data/pg_data
# I don't think I need these with host networking, but it is suppose to bind the containers port (on left) to the host port (on right)
- "5432:5432"
# A MariaDB container for loginAPI (soon to be removed)
image: mariadb:10
net: "host"
# Docker Compose will load this env file and apply the values to the containers environment
env_file: compose.mariadb.env
# Mounts the mariadb_data folder in this repo to the containers filesystem.
# MariaDB will store your data here!
- ./mariadb_data:/var/lib/mysql
- "3306:3306"
# A Redis cache container, for the caching needs of Webmaker API and ID
image: redis:3
net: "host"
- "6379:6379"
# Webmaker API
# Use this image as the base for our new one.
FROM ubuntu:14.04.2
# Specify a maintainer
MAINTAINER Mozilla Foundation <>
# install curl
RUN apt-get update && apt-get install -y \
# Install nodejs LTS PPA
RUN curl -sL | sudo bash -
# install nodejs LTS
RUN apt-get update && apt-get install -y \
# create webmaker user
RUN useradd -d /webmaker webmaker
# set working directory
WORKDIR /webmaker
# Add webmaker-api source code and dependencies
COPY . ./
# copy sample env file
RUN cp env.sample .env
# Expose default webmaker-api port
# fix permissions :|
RUN chown -R webmaker:webmaker .
# tell docker to run the CMD as this user
USER webmaker
# Command to execute when starting Webmaker API
CMD ["node","server"]
# The Webmaker API image
image: cade/webmaker-api:latest
# Docker Compose will load this env file and apply the values to the containers environment
# This is really useful for customizing the webmaker services configuration
env_file: compose.webmaker.env
net: "host"
# The webmaker ID (OAuth 2) provider
image: cade/webmaker-id:latest
net: "host"
# The legacy Webmaker LoginAPI (soon to be deprecated)
image: cade/legacy-webmaker-login:latest
env_file: compose.loginapi.env
net: "host"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment