Skip to content

Commit

Permalink
Merge pull request #3060 from metacpan/haarg/dockerfile-updates
Browse files Browse the repository at this point in the history
Dockerfile updates
  • Loading branch information
haarg committed May 10, 2024
2 parents 52ab2f4 + 4661bea commit 2be9dab
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Dockerfile
Expand Up @@ -42,22 +42,20 @@ COPY cpanfile cpanfile.snapshot ./
RUN \
--mount=type=cache,target=/root/.perl-cpm,sharing=private \
<<EOT /bin/bash -euo pipefail
cpm install --show-build-log-on-failure
cpm install --show-build-log-on-failure --resolver=snapshot
EOT

RUN mkdir var && chown metacpan:users var

ENV PERL5LIB="/metacpan-web/local/lib/perl5"
ENV PATH="/metacpan-web/local/bin:${PATH}"

COPY *.md app.psgi *.conf .
COPY *.md app.psgi *.conf ./
COPY bin bin
COPY lib lib
COPY root root
COPY --from=build-assets /build/root/assets root/assets

STOPSIGNAL SIGKILL

CMD [ \
"/uwsgi.sh", \
"--http-socket", ":80" \
Expand All @@ -76,17 +74,12 @@ USER root
RUN \
--mount=type=cache,target=/root/.perl-cpm \
<<EOT /bin/bash -euo pipefail
cpm install --with-develop
cpm install --show-build-log-on-failure --resolver=snapshot --with-develop
chown -R metacpan:users ./
EOT

USER metacpan

CMD [ \
"/uwsgi.sh", \
"--http-socket", ":80" \
]

################### Test Runner
FROM develop AS test
SHELL [ "/bin/bash", "-euo", "pipefail", "-c" ]
Expand Down Expand Up @@ -118,7 +111,7 @@ EOT
RUN \
--mount=type=cache,target=/root/.perl-cpm \
<<EOT /bin/bash -euo pipefail
cpm install --show-build-log-on-failure --with-test
cpm install --show-build-log-on-failure --resolver=snapshot --with-test
EOT

COPY .perlcriticrc .perltidyrc perlimports.toml tidyall.ini ./
Expand Down

0 comments on commit 2be9dab

Please sign in to comment.