Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into mickey/use_search_first_endpoint
  • Loading branch information
mickeyn committed Jul 13, 2017
2 parents 72d2995 + c9c904a commit f4a6ec2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -13,7 +13,7 @@
/var
carton.lock
cover_db/
local
local/
log4perl_local.conf
metacpan_web_local.conf
perltidy.LOG
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile
@@ -0,0 +1,23 @@
FROM perl:5.22

ENV PERL_MM_USE_DEFAULT=1 PERL_CARTON_PATH=/carton

COPY cpanfile cpanfile.snapshot /metacpan-web/
WORKDIR /metacpan-web

RUN cpanm App::cpm \
&& cpm install -g Carton \
&& useradd -m metacpan-web -g users \
&& mkdir /carton \
&& cpm install -L /carton \
&& rm -fr /root/.cpanm /root/.perl-cpm /tmp/*

RUN chown -R metacpan-web:users /metacpan-web /carton

VOLUME /carton

USER metacpan-web:users

EXPOSE 5001

CMD ["carton", "exec", "plackup", "-p", "5001", "-r"]
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Web/Model/API.pm
Expand Up @@ -30,7 +30,7 @@ sub client {
my $http = Net::Async::HTTP->new(
user_agent =>
'MetaCPAN-Web/1.0 (https://github.com/metacpan/metacpan-web)',
max_connections_per_host => 5,
max_connections_per_host => $ENV{NET_ASYNC_HTTP_MAXCONNS} || 5,
SSL_verify_mode => SSL_VERIFY_PEER,
timeout => 10,
);
Expand Down

0 comments on commit f4a6ec2

Please sign in to comment.