Add docker-compose and nginx config (#37)

This commit is contained in:
Maciej L 2021-10-05 21:22:49 +02:00 committed by GitHub
parent 65b446ba01
commit 3815ba0853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 0 deletions

View file

@ -12,6 +12,28 @@ $ npm install
$ npm start
```
## Installation with Docker
### Docker
```bash
git clone https://github.com/wulkanowy/fake-log.git
docker build -t fake-log .
docker run -p 3000:3000 fake-log
```
### docker-compose
```bash
git clone https://github.com/wulkanowy/fake-log.git
docker-compose up
```
You can add `-d` to both `docker run` and `docker-compose up` in order to run in "detached" mode (in background)
## Nginx reverse proxy
We provide example nginx config file [fakelog.nginx](fakelog.nginx). You will need to change SSL certificates paths and domain names. You may need to change `proxy_pass` URL
## Login
- **Email**: `jan@fakelog.cf`

6
docker-compose.yml Normal file
View file

@ -0,0 +1,6 @@
version: "3.3"
services:
web:
build: .
ports:
- "3000:3000"

18
fakelog.nginx Normal file
View file

@ -0,0 +1,18 @@
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com api.example.com cufs.example.com uonetplus.example.com uonetplus-opiekun.example.com uonetplus-uczen.example.com uonetplus-uzytkownik.example.com;
ssl_trusted_certificate /path/to/chain.pem;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
location / {
proxy_set_header Host $host;
proxy_pass http://localhost:3000;
}
}