Updated Docker Compose (markdown)

master
Hunter Long 2020-02-21 15:26:10 -08:00
parent 89960f0dd5
commit 2ecee46bad
1 changed files with 12 additions and 7 deletions

@ -6,18 +6,17 @@ This page includes multiple docker-compose.yml setups for you to run. There are
- [Postgres](#postgres-connection) - [Postgres](#postgres-connection)
### Web Serving ### Web Serving
- [Nginx as proxy pass](#nginx-proxy-pass) - [Nginx as proxy pass](#nginx-proxy-pass)
- [Nginx with LetEncrypt SSL Cert](#nginx-proxy-pass-with-ssl-letencrypt) - [Nginx with LetEncrypt SSL](#nginx-proxy-pass-with-ssl-letencrypt)
### Metrics ### Metrics
- [Grafana with Prometheus](#grafana-dashboard-with-prometheus) - [Grafana with Prometheus](#grafana-dashboard-with-prometheus)
--- ---
# Docker Volumes # Docker Volumes
- Main Volume: `/app` - `/app` - Main Volume that you should mount to a directory on the host machine
- Config file: `/app/config.yml` - `/app/config.yml` - Config file
- Logs: `/app/logs` - `/app/logs` - Logs folder (rotates every 3 days)
- Assets: `/app/assets` (if you use custom styling) - `/app/assets` - Folder containing all CSS, SCSS, JS and other static files (if you use custom styling)
- SQLite database: `/app/statping.db` - `/app/statping.db` - SQLite database file (if you're using SQLite)
--- ---
# Basic SQLite Connection # Basic SQLite Connection
@ -41,6 +40,8 @@ statping:
container_name: statping container_name: statping
image: hunterlong/statping image: hunterlong/statping
restart: always restart: always
depends_on:
- mysql
ports: ports:
- 8080:8080 - 8080:8080
volumes: volumes:
@ -81,6 +82,8 @@ statping:
- statping_data:/app - statping_data:/app
links: links:
- postgres - postgres
depends_on:
- postgres
environment: environment:
DB_CONN: postgres DB_CONN: postgres
DB_HOST: postgres DB_HOST: postgres
@ -105,6 +108,7 @@ postgres:
``` ```
# Nginx Proxy Pass # Nginx Proxy Pass
The [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) Docker image will automatically redirect a domain to a specific container.
```yaml ```yaml
statping: statping:
@ -128,6 +132,7 @@ nginx:
``` ```
# Nginx Proxy Pass with SSL (LetEncrypt) # Nginx Proxy Pass with SSL (LetEncrypt)
Using the [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) image along with [jrcs/docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) you'll be able to automatically generate SSL certificates for your Statping instance.
```yaml ```yaml
statping: statping: