Skip to content

Instantly share code, notes, and snippets.

@FinalAngel
Last active February 27, 2019 08:44
Show Gist options
  • Save FinalAngel/5432726bf5c674af7d99448451ed1d06 to your computer and use it in GitHub Desktop.
Save FinalAngel/5432726bf5c674af7d99448451ed1d06 to your computer and use it in GitHub Desktop.
To get "start" commands to run

Dockerfile

Add this to the Dockerfile:

# this snippet is required by Divio Cloud for compatibility
# https://github.com/divio/divio-cli/blob/master/divio_cli/localdev/main.py#L125
COPY migrate.sh /app/migrate.sh
COPY start.sh /usr/local/bin/start
RUN chmod +x /usr/local/bin/start
RUN curl -O https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-amd64.tgz
RUN tar xf forego-stable-linux-amd64.tgz
RUN mv forego /usr/local/bin/forego

migrate.sh

Add this to the root of the directory:

#!/bin/sh
# This script only exists for compatibility reasons to a legacy deploy system and
# will be removed. Please use the "start migrate" command to run migrations.
# Custom migrations can be added through the MIGRATION_COMMANDS setting.
set -x
start migrate

start.sh

Add this to the root of the directory:

#!/usr/bin/env bash
# This script passes the "start" commands from
# https://github.com/divio/divio-cli/blob/master/divio_cli/localdev/main.py#L125
# to forego to enable the Procile to be used
forego start $@

Profcile

Add this to the root of the directory:

migrate: echo 'no migrations required'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment