You've already forked configurator
mirror of
https://github.com/armbian/configurator.git
synced 2026-01-06 10:36:02 -08:00
docker: haproxy: Fixed the configuration
The configuraiton now works by default. Such progress... It also provides a nginx installation, so that the user can just go on its port 80 and check for the nice message. Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
This commit is contained in:
@@ -6,6 +6,7 @@ services:
|
||||
image: haproxy:latest
|
||||
volumes:
|
||||
- "./haproxy/conf:/usr/local/etc/haproxy:ro"
|
||||
- "./ssl:/etc/ssl/mine:ro"
|
||||
# Redirecting HAProxy logs can be troublesome
|
||||
# The container /dev/log to host /dev/log does
|
||||
# the trick, though.
|
||||
@@ -14,4 +15,24 @@ services:
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8448:8448
|
||||
networks:
|
||||
haproxy_net:
|
||||
aliases:
|
||||
- haproxy
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- "./www:/usr/share/nginx/website:ro"
|
||||
- "./nginx/config/nginx.conf:/etc/nginx/nginx.conf:ro"
|
||||
- "./nginx/cache:/var/cache/nginx"
|
||||
- "./nginx/run:/var/run"
|
||||
- "./nginx/logs:/var/log/nginx"
|
||||
restart: always
|
||||
networks:
|
||||
haproxy_net:
|
||||
aliases:
|
||||
- that_nginx_server
|
||||
|
||||
networks:
|
||||
haproxy_net:
|
||||
|
||||
33
modules/docker/softwares/haproxy/haproxy/conf/haproxy.cfg
Normal file
33
modules/docker/softwares/haproxy/haproxy/conf/haproxy.cfg
Normal file
@@ -0,0 +1,33 @@
|
||||
global
|
||||
daemon
|
||||
maxconn 1024
|
||||
log /dev/log local0
|
||||
ssl-default-bind-options no-tls-tickets
|
||||
ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK:!DSS:!SRP:!LOW
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect 10s
|
||||
timeout client 20s
|
||||
timeout server 20s
|
||||
timeout tarpit 60s
|
||||
timeout tunnel 3600s
|
||||
timeout http-keep-alive 300s
|
||||
timeout http-request 10s
|
||||
log global
|
||||
|
||||
frontend blogfront
|
||||
|
||||
bind *:80
|
||||
# bind *:443 ssl crt /etc/ssl/mine/youdomain.com/concat.pem
|
||||
mode http
|
||||
option httplog
|
||||
|
||||
default_backend wonderful_backend
|
||||
|
||||
backend wonderful_backend
|
||||
mode http
|
||||
balance roundrobin
|
||||
|
||||
# that_nginx_server is a DNS name define in docker-compose.yml
|
||||
server web01 that_nginx_server:80
|
||||
0
modules/docker/softwares/haproxy/nginx/cache/.placeholder
vendored
Normal file
0
modules/docker/softwares/haproxy/nginx/cache/.placeholder
vendored
Normal file
34
modules/docker/softwares/haproxy/nginx/config/nginx.conf
Normal file
34
modules/docker/softwares/haproxy/nginx/config/nginx.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 10;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name mydomainname.com;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/website;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
0
modules/docker/softwares/haproxy/ssl/.placeholder
Normal file
0
modules/docker/softwares/haproxy/ssl/.placeholder
Normal file
0
modules/docker/softwares/haproxy/www/.placeholder
Normal file
0
modules/docker/softwares/haproxy/www/.placeholder
Normal file
8
modules/docker/softwares/haproxy/www/index.html
Normal file
8
modules/docker/softwares/haproxy/www/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Armbian default nginx docker-compose index.html</title>
|
||||
<body>
|
||||
Yep, you got a website !
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user