git clone https://github.com/vadushkin/django-piano-api.git
cd backend_piano
Create file backend/.env
or delete .example
in the backend/.env.example
file
Fill in the data in the file backend/.env
.env
# Default Django Setting
SECRET_KEY=secret_key
DEBUG=1
ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0,api,[::1]
# DataBase/Postgres
POSTGRES_NAME=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DB_HOST=db
DB_PORT=5432
# Cloudinary
CLOUD_NAME=cloud_name
API_KEY=api_key
API_SECRET=api_secret
# Celery
CELERY_BROKER=redis://redis:6379/0
CELERY_BACKEND=redis://redis:6379/0
- Keys for Cloudinary
docker-compose up -d --build
docker-compose.yml
...
services:
web:
...
ports:
- "8000:80"
...
flower:
...
ports:
- "5555:5555"
...
celery:
ports:
- "default"
backend:
...
expose:
- 8000
...
redis:
ports:
- "default"
db:
...
ports:
- "5433:5432"
...