File: docker-compose.yml

package info (click to toggle)
python-django-structlog 9.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,000 kB
  • sloc: python: 3,359; sh: 206; javascript: 79; makefile: 19
file content (98 lines) | stat: -rw-r--r-- 2,173 bytes parent folder | download
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
volumes:
  local_postgres_data: {}
  local_postgres_data_backups: {}

services:
  django: &django
    build:
      context: .
      dockerfile: ./compose/local/django/Dockerfile
      args:
        PYTHON_VERSION: 3.13
    image: django_structlog_demo_project_local_django
    depends_on:
      - postgres
    volumes:
      - .:/app:cached
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.redis
      - ./.envs/.local/.postgres
    tty: true # needed for colors to show in console logs
    ports:
      - "8000:8000"
    command: /start

  django_wsgi:
    <<: *django
    environment:
      DJANGO_DEBUG: False
    ports:
      - "8001:8000"
    command: /start_wsgi

  django_asgi:
    <<: *django
    environment:
      DJANGO_DEBUG: False
    ports:
      - "8002:8000"
    command: /start_asgi

  postgres:
    build:
      context: .
      dockerfile: ./compose/local/postgres/Dockerfile
    image: django_structlog_demo_project_local_postgres
    volumes:
      - local_postgres_data:/var/lib/postgresql/data:cached
      - local_postgres_data_backups:/backups:cached
    env_file:
      - ./.envs/.local/.postgres

  redis:
    image: redis:3.2
    ports:
      - "6379:6379"

  celeryworker:
    image: django_structlog_demo_project_local_django
    depends_on:
      - redis
      - postgres
    volumes:
      - .:/app:cached
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.redis
      - ./.envs/.local/.postgres

    command: /start-celeryworker
    tty: true # needed for colors to show in console logs

  celerybeat:
    image: django_structlog_demo_project_local_django
    depends_on:
      - redis
      - postgres
    volumes:
      - .:/app:cached
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.redis
      - ./.envs/.local/.postgres

    command: /start-celerybeat
    tty: true # needed for colors to show in console logs

  flower:
    image: django_structlog_demo_project_local_django
    ports:
      - "5555:5555"
    volumes:
      - .:/app:cached
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.redis
      - ./.envs/.local/.postgres
    command: /start-flower