Skip to content

Commit

Permalink
first pass at mock Stemweb server. Implements #182
Browse files Browse the repository at this point in the history
  • Loading branch information
tla committed Nov 3, 2023
1 parent 3713e63 commit 868d971
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 33 deletions.
34 changes: 1 addition & 33 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,11 @@ services:
entrypoint: >
/bin/bash -c "./wait-for-it.sh --host=${STEMMAREST_HOST} --port=${STEMMAREST_PORT} -- /init-data/init_test_data.sh"
stemweb_mysql:
container_name: stemweb_mysql
image: mariadb:10.4
restart: always
env_file:
- stemweb/.env.dev
ports:
- "4306:3306"

stemweb_redis:
container_name: stemweb_redis
image: redis:alpine
restart: always
sysctls:
# change this Linux Kernel Parameter (default is 128) within container because of this WARNING
# "The TCP backlog setting of 511 cannot be enforced
# because /proc/sys/net/core/somaxconn is set to the lower value of 128."
net.core.somaxconn: 512 # maximal number of connections
ports:
- "7379:6379"
volumes:
- ./stemweb/redis/redis.conf:/usr/local/etc/redis/redis.conf # version 6 from https://redis.io/topics/config
command:
redis-server /usr/local/etc/redis/redis.conf

stemweb:
container_name: stemweb
image: dhuniwien/stemweb_py37:latest
restart: always
env_file:
- stemweb/.env.dev
depends_on:
- stemweb_mysql
- stemweb_redis
build: stemweb_mock
ports:
- "8000:8000"
- "51000:51000"

stemmaweb:
container_name: stemmaweb
Expand Down
9 changes: 9 additions & 0 deletions stemweb_mock/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.10
WORKDIR /src/app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY app.py .
ENV FLASK_RUN_PORT 8000
EXPOSE 8000
CMD ["flask", "run", "--debug", "--host=0.0.0.0"]
Loading

0 comments on commit 868d971

Please sign in to comment.