feat(samples): init httpaste.it sample
This commit is contained in:
parent
e8ae877a48
commit
f25e3f766c
4 changed files with 107 additions and 0 deletions
33
samples/httpaste.it/docker-compose.yml
Normal file
33
samples/httpaste.it/docker-compose.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
httpaste:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
HTTPASTE_CONFIGPATH: /usr/local/httpaste/config.ini
|
||||
volumes:
|
||||
-
|
||||
type: volume
|
||||
source: system-shared
|
||||
target: /shared
|
||||
volume:
|
||||
nocopy: true
|
||||
- ./httpaste/config.ini:/usr/local/httpaste/config.ini
|
||||
command: -s /shared/uwsgi.sock --chmod-socket=666
|
||||
httpd:
|
||||
build:
|
||||
context: ./httpd
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
-
|
||||
type: volume
|
||||
source: system-shared
|
||||
target: /shared
|
||||
volume:
|
||||
nocopy: true
|
||||
- ./httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf
|
||||
volumes:
|
||||
system-shared:
|
||||
16
samples/httpaste.it/httpaste/config.ini
Normal file
16
samples/httpaste.it/httpaste/config.ini
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[general]
|
||||
salt = '&)UxB-_$Lk$m=CB}dw[d85{-ZWR?uUNx'
|
||||
paste_id_size = 8
|
||||
paste_key_size = 32
|
||||
paste_lifetime = 5
|
||||
paste_max_lifetime = 1440
|
||||
hmac_iterations = 20000
|
||||
paste_default_encoding = 'utf-8'
|
||||
|
||||
[backend]
|
||||
type = file
|
||||
base_dirname = 'sample_data'
|
||||
|
||||
[server]
|
||||
swagger_ui = False
|
||||
bind_address = 'sample.sock'
|
||||
3
samples/httpaste.it/httpd/Dockerfile
Normal file
3
samples/httpaste.it/httpd/Dockerfile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
FROM httpd:2.4
|
||||
|
||||
RUN apt-get update -y && apt-get install -y libapache2-mod-proxy-uwsgi
|
||||
55
samples/httpaste.it/httpd/httpd.conf
Normal file
55
samples/httpaste.it/httpd/httpd.conf
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
|
||||
ServerRoot "/usr/local/apache2"
|
||||
|
||||
Listen 0.0.0.0:80
|
||||
|
||||
LoadModule mpm_event_module modules/mod_mpm_event.so
|
||||
LoadModule authn_core_module modules/mod_authn_core.so
|
||||
LoadModule authz_core_module modules/mod_authz_core.so
|
||||
#LoadModule brotli_module modules/mod_brotli.so
|
||||
LoadModule mime_module modules/mod_mime.so
|
||||
LoadModule log_config_module modules/mod_log_config.so
|
||||
#LoadModule log_debug_module modules/mod_log_debug.so
|
||||
#LoadModule log_forensic_module modules/mod_log_forensic.so
|
||||
LoadModule env_module modules/mod_env.so
|
||||
LoadModule proxy_module modules/mod_proxy.so
|
||||
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
|
||||
LoadModule unixd_module modules/mod_unixd.so
|
||||
|
||||
<IfModule unixd_module>
|
||||
User www-data
|
||||
Group www-data
|
||||
</IfModule>
|
||||
|
||||
ServerAdmin you@example.com
|
||||
|
||||
|
||||
ErrorLog /proc/self/fd/2
|
||||
|
||||
LogLevel warn
|
||||
|
||||
<IfModule log_config_module>
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
|
||||
<IfModule logio_module>
|
||||
# You need to enable mod_logio.c to use %I and %O
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||
</IfModule>
|
||||
|
||||
CustomLog /proc/self/fd/1 common
|
||||
</IfModule>
|
||||
|
||||
<IfModule ssl_module>
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
</IfModule>
|
||||
|
||||
ServerName 127.0.0.1
|
||||
|
||||
<VirtualHost 0.0.0.0:80>
|
||||
#ProxyPreserveHost On
|
||||
SetEnv proxy-sendchunks
|
||||
|
||||
ProxyPass "/" "unix:/shared/uwsgi.sock|uwsgi://localhost/"
|
||||
</VirtualHost>
|
||||
Loading…
Add table
Add a link
Reference in a new issue