Newer
Older
version: '3.1'
services:
blockchain:
image: trufflesuite/ganache-cli:latest
ports:
setup:
image: alpine
container_name: trazabilidad-setup
working_dir: /opt/project
volumes:
- .:/opt/project
command: ["sh", "startup.sh"]
api:
build:
dockerfile: Dockerfile
context: .
image: trazabilidad:dev
container_name: trazabilidad-api
volumes:
- .:/opt/project
ports:
- ${API_PORT:-8080}:8000
command: python manage.py runserver 0.0.0.0:8000
environment:
DEBUG: ${DEBUG:-1}
SECRET_KEY: ${SECRET_KEY:-secret}
depends_on:
- migrations
migrations:
build:
dockerfile: Dockerfile
context: .
image: trazabilidad:dev
container_name: trazabilidad-migrations
command: python manage.py migrate --noinput
volumes:
- .:/opt/project
environment:
DEBUG: ${DEBUG:-1}
SECRET_KEY: ${SECRET_KEY:-secret}
superuser:
depends_on:
- migrations
image: trazabilidad:dev
container_name: trazabilidad-superuser
command: python manage.py loaddata superuser
volumes:
- .:/opt/project
environment:
DEBUG: ${DEBUG:-1}
SECRET_KEY: ${SECRET_KEY:-secret}