Skip to content

Instantly share code, notes, and snippets.

@jdickey
Created February 27, 2018 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdickey/b67bc7714a51c274f0e840e3e1565005 to your computer and use it in GitHub Desktop.
Save jdickey/b67bc7714a51c274f0e840e3e1565005 to your computer and use it in GitHub Desktop.
Sample .env.development and docker-compose.yml file for Hanami in development mode using Docker
# Define ENV variables for development environment
DATABASE_URL='postgres://postgres:@db:5432/yourapp_development'
SERVE_STATIC_ASSETS="true"
WEB_SESSIONS_SECRET="d31b874186058eb00e17d9cde98e3745408b10666112a401a05a0d7ab392d30c"
version: '2.3'
services:
db:
image: postgres:10
# command: pg_createcluster --start 9.4 postgres
# user: postgres
mem_limit: 192m
volumes:
- conv-pg-data:/var/lib/postgresql/data
ports:
- "5432:5432"
web:
build: .
image: you/yourapp:dev-8-20180225
# command: bin/shotgun -p 3000 -o 0.0.0.0 config.ru
command: bin/hanami server --host=0.0.0.0
mem_limit: 256m
environment:
- DOCKERISED=true
# - RUBYOPT='-W1 -Ispec'
volumes:
- .:/app
ports:
- "80:2300"
depends_on:
- db
volumes:
yourapp-pg-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment