Merged in feature/HTTPASTE-41/samples/httpaste.it (pull request #38)
Feature/HTTPASTE-41/samples/httpaste.it
This commit is contained in:
commit
c2ca782bf6
8 changed files with 56 additions and 4 deletions
|
|
@ -1,10 +1,10 @@
|
|||
FROM python:3.10-slim
|
||||
FROM python:3.10-slim as base
|
||||
|
||||
LABEL org.label-schema.schema-version="1.0"
|
||||
LABEL org.label-schema.vendor="Tiara Rodney (victoryk.it)"
|
||||
LABEL org.label-schema.name="victorykit/httpaste"
|
||||
LABEL org.label-schema.description="a versatile HTTP pastebin"
|
||||
LABEL org.label-schema.vcs-url="https://bitbucket.org/victorykit/docker-selenium-grid"
|
||||
LABEL org.label-schema.vcs-url="https://bitbucket.org/victorykit/httpaste"
|
||||
LABEL org.label-schema.docker.cmd="docker run {image-id} {httpaste-args}"
|
||||
LABEL org.label-schema.version=$BUILD_VERSION
|
||||
LABEL org.label-schema.build-date=$BUILD_DATE
|
||||
|
|
@ -20,6 +20,11 @@ RUN apt-get update && \
|
|||
python3 setup.py install && \
|
||||
apt-get remove -y libffi-dev gcc && apt-get autoremove -y && apt-get clean -y
|
||||
|
||||
ENTRYPOINT ["httpaste"]
|
||||
|
||||
|
||||
FROM base as uwsgi
|
||||
|
||||
ENTRYPOINT ["uwsgi", "--master", "--enable-threads", "--manage-script-name", "-w", "httpaste.wsgi:application"]
|
||||
|
||||
CMD ["-s", "/tmp/yourapplication.sock"]
|
||||
|
|
@ -4,6 +4,7 @@ services:
|
|||
build:
|
||||
context: ../..
|
||||
dockerfile: Dockerfile
|
||||
target: uwsgi
|
||||
environment:
|
||||
HTTPASTE_CONFIGPATH: /usr/local/httpaste/config.ini
|
||||
volumes:
|
||||
|
|
@ -13,7 +14,7 @@ services:
|
|||
target: /shared
|
||||
volume:
|
||||
nocopy: true
|
||||
- ./httpaste/config.ini:/usr/local/httpaste/config.ini
|
||||
- ./httpaste/usr/local/httpaste/config.ini:/usr/local/httpaste/config.ini
|
||||
command: -s /shared/uwsgi.sock --chmod-socket=666
|
||||
httpd:
|
||||
build:
|
||||
|
|
@ -28,6 +29,12 @@ services:
|
|||
target: /shared
|
||||
volume:
|
||||
nocopy: true
|
||||
- ./httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf
|
||||
- ./httpd/usr/local/apache2/conf/httpd.conf:/usr/local/apache2/conf/httpd.conf
|
||||
tor:
|
||||
build:
|
||||
context: ./tor
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./tor/etc/tor/torrc:/etc/tor/torrc
|
||||
volumes:
|
||||
system-shared:
|
||||
17
samples/httpaste.it/httpaste.service
Normal file
17
samples/httpaste.it/httpaste.service
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
[Unit]
|
||||
Description=httpaste (via Docker Compose)
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/usr/local/src/httpaste/samples/httpaste.it
|
||||
ExecStart=docker-compose up
|
||||
ExecStop=docker-compose down
|
||||
TimeoutStartSec=0
|
||||
Restart=on-failure
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -61,3 +61,10 @@ ServerName 127.0.0.1
|
|||
SetEnv proxy-sendchunks
|
||||
ProxyPass "/" "unix:/shared/uwsgi.sock|uwsgi://localhost/"
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost 0.0.0.0:80>
|
||||
#ProxyPreserveHost On
|
||||
ServerAlias *.onion
|
||||
SetEnv proxy-sendchunks
|
||||
ProxyPass "/" "unix:/shared/uwsgi.sock|uwsgi://localhost/"
|
||||
</VirtualHost>
|
||||
10
samples/httpaste.it/tor/Dockerfile
Normal file
10
samples/httpaste.it/tor/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FROM debian:bullseye-slim
|
||||
|
||||
RUN apt-get update -y && apt-get install -y tor
|
||||
|
||||
COPY ./usr/local/sbin/hostname.sh /usr/local/sbin/hostname
|
||||
RUN chmod +x /usr/local/sbin/hostname
|
||||
|
||||
USER debian-tor
|
||||
|
||||
ENTRYPOINT ["tor"]
|
||||
3
samples/httpaste.it/tor/etc/tor/torrc
Normal file
3
samples/httpaste.it/tor/etc/tor/torrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
DataDirectory /var/lib/tor
|
||||
HiddenServiceDir /var/lib/tor/hidden_service/
|
||||
HiddenServicePort 80 httpd:80
|
||||
3
samples/httpaste.it/tor/usr/local/sbin/hostname.sh
Executable file
3
samples/httpaste.it/tor/usr/local/sbin/hostname.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env sh
|
||||
prop=HiddenServiceDir
|
||||
cat $(grep $prop /etc/tor/torrc | sed "s/$prop //g")/hostname
|
||||
Loading…
Add table
Add a link
Reference in a new issue