Skip to main content

Dependency Services

DB

For now, we only recommend Postgres as db service.

  1. If you are using Mac, you can setup Postgres service using Postgres.app
  2. If you are using Linux, you can use apt-get install or docker

Redis

$ docker run --rm -p 6379:6379 -d redis

Mailhog

Mailhog can help us check email content, and the style on local.

$ docker run --rm -d -p 1025:1025 -p 8025:8025 mailhog/mailhog

Docker Compose solution

Use local.yml to let people launch dependency services using one command docker compose -f local.yml up

caution

If you are using old version of Docker Compose, please use docker-compose instead of docker compose

version: '3.7'
services:
db:
image: postgres:13
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- 5432:5432
environment:
# DATABASE_URL=postgres://postgres:postgres@localhost:5432/django_app
- POSTGRES_DB=django_app
- POSTGRES_PASSWORD=postgres

redis:
image: redis:7-alpine
ports:
- 6379:6379

mailhog:
image: mailhog/mailhog
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui

volumes:
postgres_data: