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

Mailpit

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

$ docker run -d \
--restart unless-stopped \
--name=mailpit \
-p 8025:8025 \
-p 1025:1025 \
axllent/mailpit

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:16.3-bullseye
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

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

volumes:
postgres_data: