Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Python 3.7 errors on 'ensure_future = asyncio.async' in aiohttp/helpers.py
FROM python:3.6

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
libxslt-dev \
pkg-config \
python3-dev \
zlib1g-dev

RUN pip install pipenv

WORKDIR /app

ADD . /app/
RUN pipenv install

ENV PYTHONPATH=/app
CMD ["pipenv", "run", "asphalt", "run", "config.docker.yml"]
56 changes: 56 additions & 0 deletions config.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
component:
# Do not change this line. Everything will break.
type: owapi.app:APIComponent

# Is caching via redis enabled?
# This will speed up the API massively for subsequent requests, but data will be stale for 300 seconds.
# Set to False to disable.
use_redis: True

# Enable profiling?
# This is only recommended for developers.
do_profiling: False

# Disable ratelimiting?
# This prevents spam for public instances. Private instances should set this to True.
disable_ratelimits: False

# The time to cache results for.
# By default, this is 300.
# If `use_redis` is False, this statement has no effect.
# If this remains commented, the cache time used will be the default for functions.
#cache_time: 300

# Components listing. Do not edit.
components:
# The webapp component.
kyoukai:
# Do not change this line. Everything will break.
app: owapi.app:app
# Launch the app in debug mode? Recommended False for production servers.
debug: True
# The IP for Kyoukai to bind to.
ip: 0.0.0.0
# The port for Kyoukai to bind to.
port: 4444
# The redis component.
# This is ignored if `use_redis` is set to False.
redis:
connections:
redis:
# The address of your Redis server.
address: redis
# The port of your Redis server.
port: 6379
# The database to connect to on Redis.
db: 1
# The password for your Redis server.
# Do not uncomment if you do not have a password.
# password: hunter2

# Enable SSL for this redis connection?
# This must be enabled on the server side too.
ssl: False


12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

version: "3"

services:
app:
build: .
ports:
- "4444:4444"

redis:
image: redis