Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Koehler
rdmo-docker-compose
Commits
f9f8e04a
Commit
f9f8e04a
authored
Oct 16, 2019
by
olaf michaelis
Browse files
Add Apache settings
parent
94c50466
Changes
4
Hide whitespace changes
Inline
Side-by-side
apache/dockerfile_master
View file @
f9f8e04a
...
...
@@ -3,6 +3,7 @@ FROM httpd:latest
ARG UID=<UID>
ENV HTTPD_CONF="/usr/local/apache2/conf/httpd.conf"
ENV HTTPD_VHOSTS="/usr/local/apache2/conf.d/vhosts.conf"
RUN apt update -y && apt install -y \
curl \
...
...
@@ -21,7 +22,9 @@ RUN echo "LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so" >> ${HTTP
&& echo "IncludeOptional conf.d/*.conf" >> ${HTTPD_CONF}
RUN mkdir -p /usr/local/apache2/conf.d
COPY vhosts.conf /usr/local/apache2/conf.d/vhosts.conf
COPY ./vhosts.conf "${HTTPD_VHOSTS}"
COPY ./drun.sh /drun.sh
RUN useradd -m -u $UID -s /bin/bash rdmo
RUN mkdir -p /var/www/html
...
...
@@ -29,3 +32,5 @@ RUN mkdir -p /var/run/apache2
HEALTHCHECK --timeout=10s --interval=20s --retries=3 \
CMD curl -f http://localhost:80 || exit 1
CMD ["/drun.sh"]
apache/drun.sh
0 → 100755
View file @
f9f8e04a
#!/bin/bash
function
sanitize
(){
r
=
"
$(
echo
"
${
1
}
/"
\
|
tr
-s
"/"
\
|
sed
's/.$//'
)
"
if
[[
-z
"
${
r
}
"
]]
;
then
echo
"/"
else
echo
"
${
r
}
"
fi
}
export
BASE_STATIC
=
$(
sanitize
"
${
BASE_URL
}
/static"
)
export
BASE_URL
=
$(
sanitize
"
${
BASE_URL
}
"
)
# apache gets grumpy about pre-existing pid files
rm
-f
/usr/local/apache2/logs/httpd.pid
httpd
-DFOREGROUND
apache/vhosts.conf
View file @
f9f8e04a
...
...
@@ -2,8 +2,8 @@
DocumentRoot
/
var
/
www
/
html
/
Alias
/
static
/
vol
/
rdmo
-
app
/
static_root
/
<
Directory
/
vol
/
rdmo
-
app
/
static_root
/
>
Alias
${
BASE_STATIC
}
/
vol
/
rdmo
-
app
/
static_root
/
<
Directory
/
vol
/
rdmo
-
app
/
static_root
>
Require
all
granted
</
Directory
>
...
...
@@ -11,10 +11,10 @@
python
-
path
=/
vol
/
rdmo
-
app
python
-
home
=/
vol
/
ve
WSGIProcessGroup
rdmo
WSGIScriptAlias
/
/
vol
/
rdmo
-
app
/
config
/
wsgi
.
py
process
-
group
=
rdmo
WSGIScriptAlias
${
BASE_URL
}
/
vol
/
rdmo
-
app
/
config
/
wsgi
.
py
process
-
group
=
rdmo
WSGIPassAuthorization
On
<
Directory
/
vol
/
rdmo
-
app
/
config
/
>
<
Directory
/
vol
/
rdmo
-
app
/
config
>
<
Files
wsgi
.
py
>
Require
all
granted
</
Files
>
...
...
variables.env
View file @
f9f8e04a
# these are to modify the docker-compose.yaml
GLOBAL_PREFIX=rdc-
FINALLY_EXPOSED_PORT=8484
# Docker restart policy (no, on-failure, always, unless-stopped)
# see https://docs.docker.com/compose/compose-file/#restart
RESTART_POLICY=always
# settings inside the containers
VOL=/vol
# the list of URLs under which this application is available
ALLOWED_HOSTS=localhost, ip6-localhost, 127.0.0.1, [::1], rdmo
# necessary for running RDMO under subpath like 'http://yourrdmo.com/rdmo'
# if not just keep the '/', this setting shouldn't be empty
BASE_URL=/
POSTGRES_USER=rdmo
POSTGRES_PASSWORD=rdmoPGpass19
POSTGRES_DB=rdmo
...
...
@@ -22,5 +25,7 @@ RDMO_CATALOG=/tmp/rdmo-catalog
RDMO_CATALOG_REPO=https://github.com/rdmorganiser/rdmo-catalog
DEFAULT_URI_PREFIX=https://rdc/test
VOL=/vol
LOGGING_DIR=/vol/log
VE=/vol/ve
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment