Public Repository

Last pushed: 3 years ago
Short Description
Run webspecs/publican within a container
Full Description

Work in progress.

Run webspecs/publican in a container. This is based on webplatform/publican task-based-docker fork

Try it out

From a computer that has Docker installed, launch container;

docker pull webspecs/publican
docker run -it --rm -p 7002:7002 webspecs/publican bin/
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: /srv/webplatform/specs/bin/server.js
data:    /srv/webplatform/specs/bin/server.js:16 - info: Publican/0.3.1 up and running.

If you are running on Mac OS, get the IP address of boot2docker runner

boot2docker ip

From another console tab, test the service using curl:


Run using Docker Compose

Like it would be done in production.

First, ensure you have Docker Compose installed.

Then, create a folder that’ll contain a data/ folder, the one publican would expect.

In this folder, create a file called docker-compose.yml with the following YAML contents.

# file: docker-compose.yml
# ref:
#   -
#   -

  image: webspecs/publican

  # Default run is bash, using this we enforce our service to
  # run publican server for us while allowing us to enter the container
  # in case of need to understand what’s available inside.
  command: bin/

  # Make sure you have a data folder in the same
  # directory as this file. Container expects the following
  # in data/{logs,queue} AND also data/config.json
    - data/:/srv/webplatform/specs/data

  restart: always

  # Production internal server uses port 8002, so we prevent port
  # number collision internally if two web apps we deploy happen
  # to use same port.
    - "8002:7002" 

  # In production, we also add here our internal DNS server here


docker-compose up -d

Follow the logs

docker-compose logs
Docker Pull Command