summaryrefslogtreecommitdiffstats
path: root/docker/docker-compose.yml
blob: 2e6620a2e08b4b6f7412f320141b9bb7308eae7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "3"

services:
  db:
    image: postgres:15-alpine
    healthcheck:
      test: ['CMD', 'pg_isready', '-U', 'postgres']
    volumes:
      - dbdata:/var/lib/postgresql/data
    networks:
      - internal_network
    restart: always
    environment:
      - "POSTGRES_DB=takahe"
      - "POSTGRES_USER=postgres"
      - "POSTGRES_PASSWORD=insecure_password"

  web:
    build: .
    image: takahe:latest
    environment:
      - "DJANGO_SETTINGS_MODULE=takahe.settings.production"
      - "PGHOST=db"
      - "PGDATABASE=takahe"
      - "PGUSER=postgres"
      - "PGPASSWORD=insecure_password"
      - "TAKAHE_SECRET_KEY=insecure_secret"
      - "TAKAHE_MAIN_DOMAIN=example.com"
      - "TAKAHE_EMAIL_CONSOLE_ONLY=True"
      - "TAKAHE_MEDIA_BACKEND=local"
      - "TAKAHE_AUTO_ADMIN_EMAIL=admin@example.com"
    networks:
      - external_network
      - internal_network
    restart: always
    depends_on:
      - db
    ports:
      - "8000:8000"
    volumes:
      - ../:/takahe/

networks:
  internal_network:
  external_network:

volumes:
  dbdata: