aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yaml
blob: 6266d703a425acc2273124d19ece994058f806af (plain) (blame)
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
services:
  db:
    image: postgres:14
    volumes:
      - postgres_data:/var/lib/postgresql/data/
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
      interval: 10s
      timeout: 5s
      retries: 5
    environment:
      POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    networks:
      - app-network

  web:
    build: .
    command: gunicorn config.wsgi:application --bind 0.0.0.0:3000
    environment:
      DJANGO_READ_DOT_ENV_FILE: True
    volumes:
      - .:/code
    ports:
      - "3000:3000"
    depends_on:
      - db
    # env_file:
    #   - .env
    networks:
      - app-network

volumes:
  postgres_data:

networks:
  app-network: