diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index ceef8b7b3..42e11b118 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -143,6 +143,8 @@ jobs: path: | .gitinfo translations + web/static/vite_dist + web/static/api/openapi.yml build: name: Build & Publish diff --git a/Dockerfile b/Dockerfile index 7b063fbe0..c1d3d2983 100644 --- a/Dockerfile +++ b/Dockerfile @@ -147,20 +147,7 @@ RUN composer install \ COPY --chown=azuracast:azuracast . . -RUN composer dump-autoload --optimize --classmap-authoritative \ - && touch /var/azuracast/.docker - -WORKDIR /var/azuracast/www/frontend - -RUN npm ci --include=dev \ - && npm run build - -WORKDIR /var/azuracast/www - -RUN php bin/console locale:import \ - && php bin/console azuracast:api:docs \ - && rm -rf ./translations \ - && rm -rf ./frontend +RUN composer dump-autoload --optimize --classmap-authoritative USER root diff --git a/frontend/Dockerfile b/frontend/Dockerfile deleted file mode 100644 index 390872ec8..000000000 --- a/frontend/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM library/node:lts-alpine - -RUN apk update \ - && apk add bash python3 make curl g++ shadow git - -RUN groupdel dialout - -RUN mkdir -p /data/frontend/node_modules /data/translations /data/web/static \ - && chown -R node:node /data - -RUN USER=node && \ - GROUP=node && \ - curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.5.1/fixuid-0.5.1-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \ - chown root:root /usr/local/bin/fixuid && \ - chmod 4755 /usr/local/bin/fixuid && \ - mkdir -p /etc/fixuid && \ - printf "user: $USER\ngroup: $GROUP\npaths:\n - /\n - /data/frontend/node_modules\n" > /etc/fixuid/config.yml - -COPY ./entrypoint.sh / -RUN chmod a+x /entrypoint.sh - -# Define working directory. -WORKDIR /data/frontend - -# Define working user. -USER node:node - -VOLUME /data/frontend/node_modules - -ENV NODE_ENV=production -ENV HOME=/home/node - -# Define default command. -ENTRYPOINT ["/entrypoint.sh"] -CMD ["bash"]