diff --git a/tests/docker/pypy3/Dockerfile b/tests/docker/pypy3/Dockerfile new file mode 100644 index 0000000..51561e7 --- /dev/null +++ b/tests/docker/pypy3/Dockerfile @@ -0,0 +1,13 @@ +FROM pypy:3 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ + +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 3000 + +CMD [ "pypy3", "./main.py" ] \ No newline at end of file diff --git a/tests/docker/pypy3/main.py b/tests/docker/pypy3/main.py new file mode 100644 index 0000000..80d037c --- /dev/null +++ b/tests/docker/pypy3/main.py @@ -0,0 +1,6 @@ +from socketify import App + +app = App() +app.get("/", lambda res, req: res.end("Hello World socketify from Python!")) +app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)) +app.run() \ No newline at end of file diff --git a/tests/docker/pypy3/requirements.txt b/tests/docker/pypy3/requirements.txt new file mode 100644 index 0000000..9ea1426 --- /dev/null +++ b/tests/docker/pypy3/requirements.txt @@ -0,0 +1 @@ +git+https://github.com/cirospaciari/socketify.py.git@main#socketify --global-option="build_ext" \ No newline at end of file diff --git a/tests/docker/python3-alpine/Dockerfile b/tests/docker/python3-alpine/Dockerfile new file mode 100644 index 0000000..00df173 --- /dev/null +++ b/tests/docker/python3-alpine/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3-alpine + +WORKDIR /usr/src/app + +COPY requirements.txt ./ + +RUN apk add --no-cache git openssl-dev libffi-dev build-base python3-dev + +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 3000 + +CMD [ "python", "./main.py" ] \ No newline at end of file diff --git a/tests/docker/python3-alpine/main.py b/tests/docker/python3-alpine/main.py new file mode 100644 index 0000000..80d037c --- /dev/null +++ b/tests/docker/python3-alpine/main.py @@ -0,0 +1,6 @@ +from socketify import App + +app = App() +app.get("/", lambda res, req: res.end("Hello World socketify from Python!")) +app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)) +app.run() \ No newline at end of file diff --git a/tests/docker/python3-alpine/requirements.txt b/tests/docker/python3-alpine/requirements.txt new file mode 100644 index 0000000..9ea1426 --- /dev/null +++ b/tests/docker/python3-alpine/requirements.txt @@ -0,0 +1 @@ +git+https://github.com/cirospaciari/socketify.py.git@main#socketify --global-option="build_ext" \ No newline at end of file diff --git a/tests/docker/python3/Dockerfile b/tests/docker/python3/Dockerfile new file mode 100644 index 0000000..ecf4603 --- /dev/null +++ b/tests/docker/python3/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ + +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 3000 + +CMD [ "python", "./main.py" ] \ No newline at end of file diff --git a/tests/docker/python3/main.py b/tests/docker/python3/main.py new file mode 100644 index 0000000..80d037c --- /dev/null +++ b/tests/docker/python3/main.py @@ -0,0 +1,6 @@ +from socketify import App + +app = App() +app.get("/", lambda res, req: res.end("Hello World socketify from Python!")) +app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)) +app.run() \ No newline at end of file diff --git a/tests/docker/python3/requirements.txt b/tests/docker/python3/requirements.txt new file mode 100644 index 0000000..9ea1426 --- /dev/null +++ b/tests/docker/python3/requirements.txt @@ -0,0 +1 @@ +git+https://github.com/cirospaciari/socketify.py.git@main#socketify --global-option="build_ext" \ No newline at end of file