mirror of
https://github.com/umputun/reproxy.git
synced 2024-09-11 17:07:19 +03:00
add a custom static example
This commit is contained in:
parent
2d974153f0
commit
ef649f10dc
5
examples/static/README.md
Normal file
5
examples/static/README.md
Normal 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.
|
||||
|
12
examples/static/custom/Dockerfile
Normal file
12
examples/static/custom/Dockerfile
Normal 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"]
|
51
examples/static/custom/docker-compose.yml
Normal file
51
examples/static/custom/docker-compose.yml
Normal 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"
|
||||
|
Loading…
Reference in New Issue
Block a user