mirror of
https://github.com/openvk/openvk
synced 2024-11-15 11:39:13 +03:00
Alexander Minkin
76dedd6b82
* build(js): remove yarn.lock Yarn had changed its methods of packaging long ago and it hasn't been supported ever since. It's much better and easier to just use the original NPM. * fix(docker): change yarn to npm command * doc(README): change yarn mentions to npm * fix(docker): use npm ci instead of npm install * build(package-lock): update js dependencies * build(docker): use node:20 image when building
62 lines
1.7 KiB
Docker
62 lines
1.7 KiB
Docker
ARG GITREPO=openvk/openvk
|
|
FROM ghcr.io/${GITREPO}/php:8.2-cli as builder
|
|
|
|
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
|
|
|
|
ADD composer.* .
|
|
|
|
RUN composer install
|
|
|
|
FROM docker.io/node:20 as nodejs
|
|
|
|
COPY --from=builder /opt/chandler /opt/chandler
|
|
|
|
WORKDIR /opt/chandler/extensions/available/openvk/Web/static/js
|
|
|
|
ADD Web/static/js/package.json Web/static/js/package-lock.json ./
|
|
|
|
RUN npm ci
|
|
|
|
WORKDIR /opt/chandler/extensions/available/openvk
|
|
|
|
ADD . .
|
|
|
|
ARG GITREPO=openvk/openvk
|
|
FROM ghcr.io/${GITREPO}/php:8.2-apache
|
|
|
|
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
|
|
|
|
WORKDIR /opt/chandler/extensions/available/openvk
|