summaryrefslogtreecommitdiff
path: root/docs/docker.md
blob: 2aabd9f8fdd8a7bbb3b7ae3cb8c0937668199516 (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
# Install guide for Docker

```
docker run -d -p 80:80 -e FOURGET_SERVER_NAME="4get.ca" luuul/4get:latest
```

...Or with SSL:
```
docker run -d -p 443:443 -v /etc/letsencrypt/live/domain.tld:/etc/4get/certs -e FOURGET_SERVER_NAME="4get.ca" luuul/4get:latest
```

if the certificate files are not mounted to /etc/4get/certs the service listens to port 80

the certificate directory expects files named `fullchain.pem` and `privkey.pem`

# Install using Docker Compose 

copy `docker-compose.yaml`

to serve custom banners create a directory named `banners` for example with images and mount to `/var/www/html/4get/banner`

to serve captcha images create a directory named `captchas` for example containing subfolders with images and mount to `/var/www/html/4get/data/captcha`

any environment variables prefixed with `FOURGET_` will be added to the generated config

the entrypoint will automatically set the `CAPTCHA_DATASET` value for you based on directory names and number of files in each

to set `INSTANCES` pass a comma separated string of urls (FOURGET_INSTANCES = "https://4get.ca,https://domain.tld")

```
version: "3.7"

services:
  fourget:
    image: luuul/4get:latest
    restart: always
    environment:
      - FOURGET_SERVER_NAME=4get.ca

    ports:
      - "80:80"
      - "443:443"

    volumes:
      - /etc/letsencrypt/live/domain.tld:/etc/4get/certs
      - ./banners:/var/www/html/4get/banner
      - ./captchas:/var/www/html/4get/data/captcha
```

Replace relevant values and start with `docker compose up -d`