summaryrefslogtreecommitdiff
blob: 604f4700eaef3710400f1c3b7790838ac5471976 (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
version: '3.7'

services:
  http-serving:
    image: ${GLSAMAKER_IMAGE:-gentoo/glsamaker:latest}
    volumes:
      - type: "bind"
        source: "/var/log/glsamaker"
        target: "/var/log/glsamaker"
    ports:
      - 127.0.0.1:${GLSAMAKER_PORT:-5000}:5000
    labels:
      com.centurylinklabs.watchtower.enable: "true"
    restart: always
    environment:
      GLSAMAKER_LOG_FILE: '/var/log/glsamaker/web.log'
      GLSAMAKER_DOMAIN: ${GLSAMAKER_DOMAIN:-localhost}
      GLSAMAKER_POSTGRES_PASS: ${GLSAMAKER_POSTGRES_PASS:-root}
    command: "/go/src/glsamaker/bin/glsamaker --serve"
    depends_on:
      - db
  updater:
    image: ${GLSAMAKER_IMAGE:-gentoo/glsamaker:latest}
    volumes:
      - type: "bind"
        source: "/var/log/glsamaker"
        target: "/var/log/glsamaker"
    labels:
      com.centurylinklabs.watchtower.enable: "true"
    environment:
      GLSAMAKER_LOG_FILE: '/var/log/glsamaker/updater.log'
      GLSAMAKER_POSTGRES_PASS: ${GLSAMAKER_POSTGRES_PASS:-root}
    command: "/go/src/glsamaker/bin/glsamaker --full-update"
    depends_on:
      - db
  db:
    image: postgres:12
    restart: always
    environment:
      POSTGRES_USER: ${GLSAMAKER_POSTGRES_USER:-root}
      POSTGRES_PASSWORD: ${GLSAMAKER_POSTGRES_PASS:-root}
      POSTGRES_DB: ${GLSAMAKER_POSTGRES_DB:-glsamaker}
    volumes:
      - ${GLSAMAKER_POSTGRES_DATA_PATH:-/var/lib/postgresql/data}:/var/lib/postgresql/data
  watchtower:
    image: containrrr/watchtower:0.3.10
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /root/.docker/config.json:/config.json
    command: --label-enable