Skip to content

Instantly share code, notes, and snippets.

@adamstrickland
Last active May 6, 2020 17:47
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 adamstrickland/90061e82e573491d508ef9f88a6cfb32 to your computer and use it in GitHub Desktop.
Save adamstrickland/90061e82e573491d508ef9f88a6cfb32 to your computer and use it in GitHub Desktop.
version: "3.7"
networks:
default:
driver: bridge
x-base: &base
networks:
- default
services:
postgres:
<<: *base
image: postgres:9.6
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432
volumes:
- ./.data/postgres/data:/var/lib/postgresql/data
app:
<<: *base
image: ruby:2.7
command: bundle exec puma -b 0.0.0.0 -p 3000
workdir: /usr/src/app
ports:
- 3000
volumes:
- ./app:/usr/src/app
depends_on:
- database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment