-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
79 lines (63 loc) · 2.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# syntax=docker/dockerfile:1-labs
FROM registry.git.amazingcat.net/cattr/core/wolfi-os-image/cattr-dev:latest AS builder
ARG SENTRY_DSN
ARG APP_VERSION
ARG APP_ENV=production
ARG REVERB_SCHEME=http
ARG REVERB_PORT=8080
ARG BACKEND_MODULES="cattr/gitlab_integration-module cattr/redmine_integration-module"
ENV IMAGE_VERSION=5.0.0
ENV APP_VERSION $APP_VERSION
ENV SENTRY_DSN $SENTRY_DSN
ENV APP_ENV $APP_ENV
ENV YARN_ENABLE_GLOBAL_CACHE=true
ENV REVERB_APP_KEY="cattr"
ENV REVERB_HOST="127.0.0.1"
ENV REVERB_SCHEME $REVERB_SCHEME
ENV REVERB_PORT $REVERB_PORT
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=300000
COPY --chown=root:root .root-fs/etc/php82 /etc/php82
WORKDIR /app
COPY --chown=www:www . /app
USER www:www
RUN set -x && \
php /usr/bin/composer.phar require -n --no-ansi --no-install --no-update --no-audit $BACKEND_MODULES && \
php /usr/bin/composer.phar update -n --no-autoloader --no-install --no-ansi $BACKEND_MODULES && \
php /usr/bin/composer.phar install -n --no-dev --no-cache --no-ansi --no-autoloader --no-dev && \
php /usr/bin/composer.phar dump-autoload -n --optimize --apcu --classmap-authoritative
RUN set -x && \
yarn && \
yarn prod && \
rm -rf node_modules
RUN set -x && \
php artisan storage:link
FROM registry.git.amazingcat.net/cattr/core/wolfi-os-image/cattr:latest AS runtime
ARG SENTRY_DSN
ARG APP_VERSION
ARG APP_ENV=production
ARG APP_KEY="base64:PU/8YRKoMdsPiuzqTpFDpFX1H8Af74nmCQNFwnHPFwY="
ARG REVERB_APP_SECRET="secret"
ARG REVERB_SCHEME=http
ARG REVERB_PORT=8080
ENV IMAGE_VERSION=5.0.0
ENV REVERB_APP_KEY="cattr"
ENV REVERB_HOST="127.0.0.1"
ENV REVERB_SCHEME $REVERB_SCHEME
ENV REVERB_PORT $REVERB_PORT
ENV REVERB_APP_SECRET $REVERB_APP_SECRET
ENV DB_CONNECTION=mysql
ENV DB_HOST=db
ENV DB_USERNAME=root
ENV DB_PASSWORD=password
ENV LOG_CHANNEL=stderr
ENV APP_VERSION $APP_VERSION
ENV SENTRY_DSN $SENTRY_DSN
ENV APP_ENV $APP_ENV
ENV APP_KEY $APP_KEY
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=300000
COPY --from=builder /app /app
COPY --chown=root:root .root-fs /
VOLUME /app/storage
#HEALTHCHECK --interval=5m --timeout=10s \
# CMD wget --spider -q "http://127.0.0.1:8090/status"
EXPOSE 80