django-gallery/docker-compose.yaml
David Todd 51a117ca5f
Add configuration to connect to a postgres database (#2)
CircleCI's free service only allows running 1 container at a time.
This causes problems if I want to use a database.
A workaround that I found seems to work by running the database server directly within the test container. This does increase test time however
2018-03-08 21:25:54 -06:00

35 lines
684 B
YAML

version: '3'
services:
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: totallyHacked1337
POSTGRES_USER: imagehost
POSTGRES_DB: imagehost_db
volumes:
- ./backup:/backup
ports:
- '5432:5432'
imagehost_portal:
build: .
environment:
PORTAL_DEBUG: 'true'
POSTGRES_PASSWORD: totallyHacked1337
POSTGRES_USER: imagehost
POSTGRES_DB: imagehost_db
POSTGRES_HOST: postgres
volumes:
- .:/portal
ports:
- '8000:8000'
depends_on:
- postgres
working_dir: /portal
command: |
/usr/local/bin/wait-for-it.sh -t 60 postgres:5432 --
sh /portal/run.sh