summaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
blob: f64bfb68113f37b6cb605d0f38a9dba059655926 (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
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=tahake"
      - "POSTGRES_USER=postgres"
      - "POSTGRES_PASSWORD=insecure_password"

  web:
    build: .
    image: tahake:latest
    environment:
      - "DJANGO_SETTINGS_MODULE=takahe.settings"
      - "SECRET_KEY=insecure_secret"
      - "POSTGRES_HOST=db"
      - "POSTGRES_DB=tahake"
      - "POSTGRES_USER=postgres"
      - "POSTGRES_PASSWORD=insecure_password"
    networks:
      - external_network
      - internal_network
    restart: always
    depends_on:
      - db
    ports:
      - "8000:8000"

networks:
  internal_network:
  external_network:

volumes:
  dbdata: