Unverified Commit b6dbb627 authored by Tom Moulard's avatar Tom Moulard
Browse files

hits: adding a hit counter service

parent 104031cb
Loading
Loading
Loading
Loading

hits/.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
postgresql
.*.swp

hits/README.md

0 → 100644
+12 −0
Original line number Diff line number Diff line
# Hits

Is a hit counter using images: one image is served, the count is incremented.

See [source](https://github.com/dwyl/hits).

## Setup
Since PostgreSQL is a pain to setup, you must do this before launching the
service:
```bash
mkdir hits/postgresql
```
+32 −0
Original line number Diff line number Diff line
version: '2'

networks:
  hits-internal:

services:
  hits:
    image: tommoulard/hits
    networks:
      - 'srv'
      - 'hits-internal'
    restart: always
    depends_on:
      - 'hits-postgresql'
    labels:
      - 'traefik.enable=true'
      - 'traefik.frontend.rule=Host:hits.${SITE}'
      - 'traefik.port=4000'
  hits-postgresql:
    image: postgres
    restart: always
    user: 1000:1000
    networks:
      hits-internal:
        aliases:
          - 'postgresql'
    environment:
      - 'POSTGRES_USER=postgres'
      - 'POSTGRES_PASSWORD=postgres'
    volumes:
      - './hits/postgresql/:/var/lib/postgresql/data'