Skip to content

Commit 4c03e03

Browse files
committed
modify docker containers to allow for mock servers. work on docker image.
1 parent 99c4a9b commit 4c03e03

File tree

6 files changed

+65
-0
lines changed

6 files changed

+65
-0
lines changed

docker/damngoodtech/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG PYTHON_IMG=3-alpine
2+
3+
FROM python:${PYTHON_IMG:-latest}
4+
5+
EXPOSE 5000
6+
7+
ENV PROJECT_DIR /app
8+
ENV PYTHONUNBUFFERED 1
9+
10+
# module holding our project instance
11+
ENV FLASK_APP=wsgi.py
12+
ENV FLASK_DEBUG=False
13+
ENV FLASK_ENV=production
14+
15+
WORKDIR ${PROJECT_DIR}
16+
COPY docker/damngoodtech/entrypoint.sh /
17+
COPY Pipfile Pipfile.lock ${PROJECT_DIR}
18+
COPY src ${PROJECT_DIR}/src
19+
RUN apk add --no-cache --update fish
20+
21+
# https://jonathanmeier.io/using-pipenv-with-docker/
22+
RUN apk add --no-cache --update --virtual \
23+
gcc \
24+
make && \
25+
python -m pip install pipenv && \
26+
pipenv install --system --deploy
27+
28+
WORKDIR ${PROJECT_DIR}

docker/damngoodtech/entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/ash
2+
3+
# sleep for a bit of time
4+
# in case we're including the smtpdebug server
5+
# TODO: do automatic checks .e.g flag for debug mode
6+
sleep 5 && python -m src.wsgi

docker/mock_ics/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:current-alpine
2+
3+
EXPOSE 5002
4+
5+
RUN apk add \
6+
--update --virtual --no-cache \
7+
g++ \
8+
make \
9+
python3
10+
11+
WORKDIR /app
12+
COPY ./docker/mock_ics/start.sh /
13+
RUN chmod +x /start.sh
14+
COPY package.json /app
15+
COPY mocking /app/mocking/
16+
WORKDIR /app
17+
RUN npm i

docker/mock_ics/start.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
node /app/mocking/ics.js

docker/smtpdebug/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM python:latest
2+
EXPOSE 1025
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ul class="navbar-nav me-auto mb-2 mb-lg-0 px-4 py-1 text-secondary">
2+
<li class="nav-item">
3+
{{ request.host }}
4+
is powered by
5+
<a href="https://github.com/src-r-r/ink-in-time">
6+
Ink-In-Time
7+
</a>,
8+
The Open Source No-Frills Scheduler
9+
</li>
10+
</ul>

0 commit comments

Comments
 (0)