mirror of
https://github.com/norohind/caddy-uwsgi-transport.git
synced 2025-03-23 12:00:02 +03:00
init
This commit is contained in:
commit
23b4185a4b
5
Caddyfile
Normal file
5
Caddyfile
Normal file
@ -0,0 +1,5 @@
|
||||
:80 {
|
||||
reverse_proxy uwsgi:3000 {
|
||||
transport uwsgi
|
||||
}
|
||||
}
|
22
docker-compose.yaml
Normal file
22
docker-compose.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
services:
|
||||
caddy:
|
||||
build:
|
||||
dockerfile_inline: |
|
||||
FROM docker.io/caddy:2.7.5-builder-alpine AS builder
|
||||
RUN xcaddy build --with github.com/wxh06/caddy-uwsgi-transport
|
||||
FROM docker.io/caddy:2.7.5-alpine
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
|
||||
ports:
|
||||
- "8888:80"
|
||||
|
||||
uwsgi:
|
||||
build:
|
||||
dockerfile_inline: |
|
||||
FROM docker.io/python:3.11-slim
|
||||
RUN apt update && apt install -y --no-install-recommends gcc libc6-dev && pip install uwsgi
|
||||
COPY hello.py /hello.py
|
||||
COPY uwsgi.ini /uwsgi.ini
|
||||
# CMD ["/usr/local/bin/uwsgi", "--socket", ":3000", "--wsgi-file", "/hello.py"] # That way it works
|
||||
CMD ["/usr/local/bin/uwsgi", "-c", "/uwsgi.ini"] # That way it doesn't works
|
3
hello.py
Normal file
3
hello.py
Normal file
@ -0,0 +1,3 @@
|
||||
def application(env, start_response):
|
||||
start_response('200 OK', [('Content-Type','text/html')])
|
||||
return [b"Hello World"]
|
Loading…
x
Reference in New Issue
Block a user