2022-10-30 14:44:14 +03:00
|
|
|
ARG GITREPO=openvk/openvk
|
2023-12-10 21:21:50 +03:00
|
|
|
FROM ghcr.io/${GITREPO}/php:8.2-cli as builder
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
WORKDIR /opt
|
|
|
|
|
|
|
|
RUN git clone --depth=2 https://github.com/openvk/chandler.git
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler
|
|
|
|
|
|
|
|
RUN composer install
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler/extensions/available
|
|
|
|
|
|
|
|
RUN git clone --depth=2 https://github.com/openvk/commitcaptcha.git
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler/extensions/available/commitcaptcha
|
|
|
|
|
|
|
|
RUN composer install
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler/extensions/available
|
|
|
|
|
|
|
|
RUN mkdir openvk
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler/extensions/available/openvk
|
|
|
|
|
2024-07-11 00:34:25 +03:00
|
|
|
ADD composer.* .
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
RUN composer install
|
|
|
|
|
|
|
|
FROM docker.io/node:14 as nodejs
|
|
|
|
|
|
|
|
COPY --from=builder /opt/chandler /opt/chandler
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler/extensions/available/openvk/Web/static/js
|
|
|
|
|
2024-07-11 00:34:25 +03:00
|
|
|
ADD Web/static/js/package.json Web/static/js/package-lock.json Web/static/js/yarn.lock ./
|
|
|
|
|
2022-10-30 14:44:14 +03:00
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
WORKDIR /opt/chandler/extensions/available/openvk
|
|
|
|
|
2024-07-11 00:34:25 +03:00
|
|
|
ADD . .
|
|
|
|
|
2022-10-30 14:44:14 +03:00
|
|
|
ARG GITREPO=openvk/openvk
|
2023-12-10 21:21:50 +03:00
|
|
|
FROM ghcr.io/${GITREPO}/php:8.2-apache
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
COPY --from=nodejs --chown=www-data:www-data /opt/chandler /opt/chandler
|
|
|
|
|
|
|
|
RUN ln -s /opt/chandler/extensions/available/commitcaptcha/ /opt/chandler/extensions/enabled/commitcaptcha && \
|
|
|
|
ln -s /opt/chandler/extensions/available/openvk/ /opt/chandler/extensions/enabled/openvk && \
|
|
|
|
rm -f /etc/apache2/sites-enabled/000-default.conf && \
|
|
|
|
ln -s /opt/chandler/extensions/available/openvk/install/automated/common/10-openvk.conf /etc/apache2/sites-enabled/10-openvk.conf && \
|
|
|
|
a2enmod rewrite
|
|
|
|
|
|
|
|
VOLUME [ "/opt/chandler/extensions/available/openvk/storage" ]
|
|
|
|
VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/audios" ]
|
|
|
|
VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/photos" ]
|
|
|
|
VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/videos" ]
|
|
|
|
|
|
|
|
USER www-data
|