aboutsummaryrefslogtreecommitdiffstats
path: root/compose.yaml
blob: 9b148eb1f0085988d33d5ffd73314097e17a380e (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: net_services

services:
  nginx:
    image: nginx:${COMPOSE_PROJECT_NAME}
    build:
      context: services/nginx
    environment:
      - NGINX__HOST=${NGINX__HOST}
    networks:
      - cgit
      - radicale
    ports:
      - ${HOST__HTTP_PORT:?}:80
      - ${HOST__HTTPS_PORT:?}:443
    tmpfs:
      - /run/secrets:mode=400
    volumes:
      - ${HOST__CERT_DIR:?}:/run/host_secrets:ro
    depends_on:
      - cgit
      - radicale

  cgit:
    image: cgit:${COMPOSE_PROJECT_NAME}
    build:
      context: services/cgit
    networks:
      - cgit
    volumes:
      - ${HOST__CGITRC_DIR:?}:/etc/cgit:ro
      - ${HOST__CGIT_FILTER_DIR:?}:/usr/local/lib/cgit/filters/commit
      - ${HOST__CGIT_ABOUT_DIR:?}:/srv/cgit:ro
      - ${HOST__GIT_REPO_DIR:?}:/srv/git:ro

  radicale:
    image: tomsquest/docker-radicale:tvcloud
    build:
      context: services/radicale
    environment:
      - TAKE_FILE_OWNERSHIP=false
    init: true
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    cap_add:
      - SETUID
      - SETGID
      - CHOWN
      - KILL
    deploy:
      resources:
        limits:
          memory: 256M
          pids: 50
    healthcheck:
      test: curl -f http://127.0.0.1:5232 || exit 1
      start_period: 5s
    networks:
      - radicale
    volumes:
      - ${HOST__RADICALE_USERS_DIR:?}:/etc/radicale/users:ro
      - radicale_data:/data

networks:
  cgit:
  radicale:

volumes:
  radicale_data: