summaryrefslogtreecommitdiff
path: root/README.md
blob: fd69968f0da867373d25e3badc3542dd03c1c160 (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
73
74
75
76
77
78
79
80
81
82
# Podcast Synchronisation made Efficient - Docker Compose

> Docker Compose for PSE Frontend, Backend and Database

## Configuration

All configuration can be done in the `.env` file. 
```
FRONTEND_DOMAIN=<YOUR FRONTEND DOMAIN>
BACKEND_DOMAIN=<YOUR BACKEND DOMAIN>

SPRING_MAIL_HOST=<YOUR MAIL HOST SMTP>
SPRING_MAIL_PORT=587
SPRING_MAIL_USERNAME=<YOUR MAIL ADDRESS>
SPRING_MAIL_PASSWORD=<YOUR MAIL PASSWORD>
```

Domains can be tested locally by editing `/etc/hosts` or
`C:\Windows\System32\drivers\etc\hosts` on the host.
```
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 pse-squared.de
127.0.0.1 api.pse-squared.de
```

## Build the Image

To build the composition run
```sh
$ docker compose build
```

You might want to build without cached results to be absolutely sure
```sh
$ docker-compose build --no-cache
```


## To run the server

You need docker compose to run the server. In order to launch it, you go to the
repo folder `pse-docker` where the `docker-compose.yml` is located and run
```sh
$ docker compose up
```

The server is now running. In order to shut it down, run
```sh
$ docker compose down
```

Have fun.

## To use SSL

You need to shut down the server if it is running and remove the current `reverse-proxy` image.

First you need to uncomment the `certbot` service in `docker-compose.yml`, as well as
```
location /.well-known/acme-challenge {
    root /letsencrypt/;
}
```
in `nginx.conf` located at `reverse-proxy/conf.d/`.

Next you need to restart the server for the first time. 
In the console it should tell you that the certificates were created, if everything went correctly.

Shut the server down and once more remove the current `reverse-proxy` image.
In the earlier used `nginx.conf` you need to comment / uncomment the rest of the file designated by the corresponding comments.
Also enable port 443 and the commented volumes in the `docker-compose.yml` for the `reverse-proxy` service.

Run the server again.
If everything went well, the server should now use HTTPS.

The certificates should be located in `reverse-proxy/letsencrypt/`.

## License

This project is licensed under the AGPL-3 License - see the `LICENSE` file for details