Skip to content

Instantly share code, notes, and snippets.

@moacirmoda
Created July 5, 2018 13:52
Show Gist options
  • Save moacirmoda/c0a0543f66d3616d7957d753e167a206 to your computer and use it in GitHub Desktop.
Save moacirmoda/c0a0543f66d3616d7957d753e167a206 to your computer and use it in GitHub Desktop.
Compose API
version: "3"
services:
database:
image: postgres:9.6.0
restart: always
volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
- LC_ALL=C.UTF-8
- POSTGRES_PASSWORD=api_receita
- POSTGRES_USER=api_receita
ports:
- 5432:5432
app:
build: .
command: gunicorn api_receita.wsgi -b 0.0.0.0:8000
working_dir: /app
ports:
- 8000:8000
volumes:
- ./:/app
links:
- database
- redis
redis:
image: redis
ports:
- 6379:6379
links:
- database
celery:
build: .
command: celery -A api_receita worker -E -B --loglevel=DEBUG
working_dir: /app
links:
- database
- redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment