Django/Redis/Postgres

Sample Repo

The repo for a sample django can be found here:

https://github.com/getreploy/django-sample

Sample file

services:
django:
port: 8000
model: url
runtime: python3
environment:
DEBUG: true
serve:
- pip3 -q install -r requirements.txt
- python3 manage.py runserver 0.0.0.0:8000
redis:
port: 6379
runtime: redis
do-not-expose: true
postgres:
port: 5432
runtime: postgres
# mount-path-container: /docker-entrypoint-initdb.d (optional if you need seed data)
# mount-path-volume: pg_data_dir (optional if you need seed data)
do-not-expose: true
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres

The reploy.yml file for this environment can also be found here:

https://github.com/getreploy/django-sample/blob/master/reploy.yml

Service Description

In the above file, we have three services, each of which describe a "process" or "container". A little bit about each service:

  • The django service is a django application, which uses our python3 runtime.