Skip to content

Commit

Permalink
Add docker compose setup for easy running specs on local
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwolfz committed Jan 26, 2024
1 parent 33d3cdb commit fd31ef8
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,57 @@
---

version: '2.4'

networks:
internal_network:
driver: bridge

volumes:
bundle_data:
driver: local
postgres_data:
driver: local

x-default-logging: &logging
logging:
options:
max-size: '12m'
max-file: '5'
driver: json-file

services:
console:
image: ruby
command: sleep 10000000;
environment:
CI: t
PGHOST: postgres
PGUSER: administrate
PGPASSWORD: administrate
<<: *logging
networks:
- internal_network
volumes:
- .:/work
- bundle_data:/usr/local/bundle
working_dir: /work

postgres:
image: postgres
environment:
POSTGRES_USER: administrate
POSTGRES_DB: administrate_test
POSTGRES_PASSWORD: administrate
healthcheck:
test: pg_isready -U notroot -h localhost -p 5432 -d healthcheck-db || exit 1
interval: '10s'
retries: 20
start_period: '10s'
timeout: '7s'
<<: *logging
networks:
- internal_network
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data

0 comments on commit fd31ef8

Please sign in to comment.