1
0
mirror of https://github.com/umputun/reproxy.git synced 2024-11-24 08:12:31 +02:00

add a custom static example

This commit is contained in:
Umputun 2021-06-27 12:59:15 -05:00
parent 2d974153f0
commit ef649f10dc
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# Example of a static provider within docker compose
The example under `custom` shows how to make a web-serving container built on top of reproxy image and routing api request to another container directly, without the actual docker discovery.

View File

@ -0,0 +1,12 @@
# example of a Dockerfile using reproxy as a base for the custom container
FROM klakegg/hugo:0.83.1-ext-alpine as build
ADD . /build
WORKDIR /build
RUN hugo --minify
FROM ghcr.io/umputun/reproxy:latest
COPY --from=build /build/public /www
EXPOSE 8080
USER app
ENTRYPOINT ["/srv/reproxy"]

View File

@ -0,0 +1,51 @@
version: '2.4'
services:
website:
image: somtehing/hugo-site
restart: always
container_name: website
hostname: website
logging: &default_logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
ports:
- "80:8080"
- "443:8443"
volumes:
- ./var/ssl:/srv/var/ssl
- ./var/logs:/srv/var/logs
environment:
- TZ=America/Chicago
- GZIP=true
- MAX_SIZE=256K
- LOGGER_ENABLED=true
- LOGGER_FILE=/srv/var/logs/access.log
- SSL_TYPE=auto
- SSL_ACME_EMAIL=me@example.com
- SSL_ACME_FQDN=site.example.com
- SSL_ACME_LOCATION=/srv/var/ssl
- HEADER=
X-Frame-Options:SAMEORIGIN,
X-XSS-Protection:1; mode=block;,
X-Content-Type-Options:nosniff,
Strict-Transport-Security:max-age=31536000,
Referrer-Policy:no-referrer,
Content-Security-Policy:default-src 'self'; style-src 'self' 'unsafe-inline';
- ASSETS_LOCATION=/www
- ASSETS_CACHE=48h,text/html:1m
- STATIC_ENABLED=true
- STATIC_RULES=*,/api/email/(.*),http://email-sender:8080/$$1,http://email-sender:8080/ping
email-sender:
image: somtehing/email-sender
restart: always
container_name: email-sender
hostname: email-sender
logging: *default_logging
ports:
- "8080"