Compare commits
4 Commits
d9f194118c
...
0058f8bb4c
Author | SHA1 | Date |
---|---|---|
|
0058f8bb4c | |
|
06ef3d4146 | |
|
810f7d07b8 | |
|
9023294c60 |
|
@ -0,0 +1,7 @@
|
|||
*
|
||||
!src/
|
||||
!static/
|
||||
!MANIFEST.in
|
||||
!setup.py
|
||||
!start.sh
|
||||
!httpd.conf
|
|
@ -0,0 +1,50 @@
|
|||
FROM registry.fedoraproject.org/fedora-minimal:39 AS build
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache \
|
||||
microdnf install -y \
|
||||
--disablerepo=fedora-cisco-openh264 \
|
||||
--setopt=install_weak_deps=0 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
&& :
|
||||
|
||||
COPY . /build
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN python3 -m pip wheel -w dist .
|
||||
|
||||
FROM registry.fedoraproject.org/fedora-minimal:39
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache \
|
||||
--mount=type=bind,from=build,source=/build,target=/build \
|
||||
microdnf install -y \
|
||||
--disablerepo=fegora-cisco-openh264 \
|
||||
--setopt=install_weak_deps=0 \
|
||||
httpd \
|
||||
python3-setproctitle \
|
||||
python3-gunicorn \
|
||||
python3-pip \
|
||||
tini \
|
||||
&& python3 -m pip install --no-index -f /build/dist DarkChestOfWonders \
|
||||
&& install -o apache -g apache -d /data/screenshots /data/thumbnails \
|
||||
&& chown apache: /var/log/httpd /var/run/httpd \
|
||||
&& install /build/start.sh / \
|
||||
&& sed -i \
|
||||
-e 's/Listen 80/Listen 8204/' \
|
||||
-e 's:logs/error_log:/dev/stderr:g' \
|
||||
-e 's:logs/access_log:/dev/stderr:g' \
|
||||
/etc/httpd/conf/httpd.conf \
|
||||
&& cp /build/httpd.conf /etc/httpd/conf.d/ \
|
||||
&& :
|
||||
|
||||
EXPOSE 8204
|
||||
|
||||
USER apache
|
||||
|
||||
VOLUME /data
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
ENTRYPOINT ["tini", "/start.sh"]
|
|
@ -0,0 +1,11 @@
|
|||
ServerName 127.0.0.1
|
||||
|
||||
Alias /screenshots /data/screenshots
|
||||
|
||||
<Directory /data/screenshots>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ProxyPass /screenshots !
|
||||
ProxyPass / http://127.0.0.1:8000/
|
||||
ProxyPassReverse / http://127.0.:0.1:8000/
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
|||
|
||||
setup(
|
||||
name='DarkChestOfWonders',
|
||||
version='4',
|
||||
version='5',
|
||||
description='Dark Chest of Wonders Guild Site',
|
||||
author='Gyrfalcon',
|
||||
author_email='gyrfalcon@darkchestofwonders.us',
|
||||
|
|
|
@ -30,10 +30,12 @@ class VariedResponse(milla.Response):
|
|||
context = {}
|
||||
if template is None or self.request.want == 'json':
|
||||
self.content_type = str('application/json')
|
||||
self.charset = 'utf-8'
|
||||
json.dump(context, self.body_file)
|
||||
else:
|
||||
if self.request.want == 'xhtml':
|
||||
self.content_type = str('application/xhtml+xml')
|
||||
self.charset = 'utf-8'
|
||||
self.render(template, context)
|
||||
|
||||
def render(self, template, context=None):
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import os
|
||||
|
||||
import dcow.app
|
||||
|
||||
|
||||
config = os.environ.get('DCOW_CONFIG', 'production.ini')
|
||||
application = dcow.app.Application.create(config)
|
Loading…
Reference in New Issue