Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uwsgi for web server in docker #2987

Closed
wants to merge 1 commit into from
Closed
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
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN \
apt update
apt install -y -f --no-install-recommends nodejs
npm install -g npm
apt install -y -f libcmark-dev dumb-init
apt install -y -f libcmark-dev
EOT

WORKDIR /metacpan-web/
Expand All @@ -39,9 +39,14 @@ RUN mkdir var && chown metacpan:users var

USER metacpan

EXPOSE 5001

# Runs "/usr/bin/dumb-init -- /my/script --with --args"
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

CMD ["plackup", "-p", "5001", "-r"]
CMD [ \
"/usr/bin/uwsgi", \
"--plugins", "psgi", \
"--uwsgi-socket", ":3031", \
"--http-socket", ":80", \
"--http-socket-modifier1", "5", \
"--ini", "/metacpan-web/servers/uwsgi.ini", \
"--psgi", "app.psgi" \
]

EXPOSE 80 3031
6 changes: 6 additions & 0 deletions servers/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[uwsgi]
master = true
workers = 20
early-psgi = true
perl-no-die-catch = true
disable-logging = true
Loading