Skip to content

Commit

Permalink
refer to rimelek/httpd24 in the docs again
Browse files Browse the repository at this point in the history
  • Loading branch information
rimelek committed Mar 28, 2023
1 parent 69a599a commit dd658cf
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 198 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
/venv
/.pytest_cache
__pycache__
/var

# Sphinx files
/docs/_*
/var
/docs/.env

# Operating system specific

## macOS
.DS_Store
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://docs.readthedocs.io/en/stable/config-file/v2.html

version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
sphinx:
configuration: docs/conf.py
formats: all
python:
install:
- requirements: docs/requirements.txt
1 change: 1 addition & 0 deletions docs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_*
18 changes: 18 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.8 AS build

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
make \
graphviz \
&& pip3 install --upgrade pip==21.3.1

COPY "requirements.txt" "/code/"
RUN pip3 --disable-pip-version-check install -r /code/requirements.txt

COPY "." "/code/"

RUN cd /code \
&& sphinx-build -M html "." "_build" -W

FROM pierrezemb/gostatic
COPY --from=build /code/_build/html /srv/http
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

9 changes: 9 additions & 0 deletions docs/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
web:
build:
context: .
ports:
- target: 8043
published: ${PORT:-80}
protocol: tcp
mode: host
129 changes: 13 additions & 116 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

Expand All @@ -15,143 +13,42 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme

# -- Project information -----------------------------------------------------
# import sphinx_rtd_theme

project = 'itsziget/httpd24'
copyright = u'2018, Takács Ákos'
author = u'Takács Ákos'
# -- Project information -----------------------------------------------------

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = ''
project = 'rimelek/httpd24'
copyright = '2018, Ákos Takács'
author = 'Ákos Takács'


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinxcontrib.jquery'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'venv']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"

html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'ItszigetHttpd24doc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'ItszigetHttpd24.tex', 'itsziget/httpd24 Documentation',
u'Takács Ákos', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'httpd24dockerimage', 'itsziget/httpd24 Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'ItszigetHttpd24', 'itsziget/httpd24 Documentation',
author, 'ItszigetHttpd24', 'One line description of project.',
'Miscellaneous'),
]
# html_static_path = ['_static']
28 changes: 14 additions & 14 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ With Let's Encrypt without custom certificate name
--env SRV_NAME=YOURDOMAIN \
-v /etc/letsencrypt:/etc/letsencrypt \
-p 443:443 \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
With Let's Encrypt and custom certificate name
+++++++++++++++++++++++++++++++++++++++++++++++
Expand All @@ -29,7 +29,7 @@ With Let's Encrypt and custom certificate name
--env CERT_NAME=CUSTOMCERTNAME \
-v /etc/letsencrypt:/etc/letsencrypt \
-p 443:443 \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
You can mount custom certificate two ways
++++++++++++++++++++++++++++++++++++++++++
Expand All @@ -41,7 +41,7 @@ You can mount custom certificate two ways
-v /path/to/custom.key:/usr/local/apache2/ssl.key \
-v /path/to/custom.crt:/usr/local/apache2/ssl.crt \
-p 443:443 \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
or

Expand All @@ -54,20 +54,20 @@ or
-v /path/to/custom.key:/ssl.key \
-v /path/to/custom.crt:/ssl.crt \
-p 443:443 \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
HTTP Authentication
-------------------

.. code-block:: bash
docker run --rm -i itsziget/httpd24 /bin/bash -c "htpasswd -nb YOURUSERNAME YOURPASSWORD" >> .htpasswd
docker run --rm -i rimelek/httpd24 /bin/bash -c "htpasswd -nb YOURUSERNAME YOURPASSWORD" >> .htpasswd
docker run -d \
-v `pwd`/.htpasswd:/usr/local/apache2/.htpasswd \
--env SRV_AUTH="true" \
-p 80:80 \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
or just generate htpasswd inside the container

Expand All @@ -78,7 +78,7 @@ or just generate htpasswd inside the container
--env SRV_AUTH_USERS="admin1 password1\
admin2 password2"
-p 80:80 \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Simplest way to use PHP-FPM
Expand All @@ -100,7 +100,7 @@ Legacy way
--env SRV_PHP="true" \
-p "80:80" \
--link php \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Recommended way
+++++++++++++++
Expand All @@ -120,7 +120,7 @@ Recommended way
--env SRV_PHP=1 \
-p "80:80" \
--network phptest \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Reusing the network of the HTTPD container
Expand All @@ -140,7 +140,7 @@ Reusing the network of the HTTPD container
--env SRV_PHP=1 \
--env SRV_PHP_HOST=localhost \
--network container:php \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Use the rewrite engine
Expand All @@ -153,7 +153,7 @@ Use the rewrite engine
-p 80:80 \
--env SRV_ENABLE_MODULES="rewrite" \
--env SRV_ALLOW_OVERRIDE="true" \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Forward the admin page to another site:
---------------------------------------
Expand All @@ -165,7 +165,7 @@ Forward the admin page to another site:
-p 80:80 \
--env SRV_PROXY_FORWARD_FROM="/admin/" \
--env SRV_PROXY_FORWARD_TO="http://admin.mysite.tld/" \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Get real client IP behind reverse proxy
Expand All @@ -180,7 +180,7 @@ Proxy protocol
-v $PWD/src:/usr/local/apache2/htdocs \
-p 80:80 \
--env SRV_PROXY_PROTOCOL="true" \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
Client IP header
++++++++++++++++
Expand All @@ -192,4 +192,4 @@ Client IP header
-p 80:80 \
--env SRV_REVERSE_PROXY_CLIENT_IP_HEADER="X-Forwarded-For" \
--env SRV_REVERSE_PROXY_DOMAIN="haproxy" \
itsziget/httpd24:2.0
rimelek/httpd24:2.0
8 changes: 2 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
.. itsziget/httpd24 documentation master file, created by
sphinx-quickstart on Mon Jun 11 11:07:41 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to itsziget/httpd24 Docker image's documentation!
=========================================================
Welcome to rimelek/httpd24 Docker image's documentation!
========================================================

Have you heard about `Docker <https://www.docker.com/>`_ (Container engine)? Well, if you ever had problem with installing
dependencies on the same machine for different projects, you should. If you need an `Apache HTTPD <https://hub.docker.com/_/httpd/>`_
Expand Down

0 comments on commit dd658cf

Please sign in to comment.