mirror of
https://github.com/c0de-archive/django-gallery.git
synced 2024-12-22 10:12:41 +00:00
51a117ca5f
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
35 lines
684 B
YAML
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
|