mirror of
https://github.com/sigmasternchen/php-chess
synced 2025-03-14 23:58:53 +00:00
chore: Add Dockerfile
This commit is contained in:
parent
985bff13b7
commit
cc4e809d6b
1 changed files with 21 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
FROM node:22 AS js-build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN mkdir -p /html/static/
|
||||||
|
|
||||||
|
COPY js/package*.json ./
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY js/src ./src
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM php:8.1-apache
|
||||||
|
|
||||||
|
WORKDIR /var/www/
|
||||||
|
COPY . .
|
||||||
|
RUN rm -rf js/ .github/ tests/ .git/
|
||||||
|
|
||||||
|
COPY --from=js-build /html/static/bundle.js ./html/static/
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["apache2-foreground"]
|
Loading…
Reference in a new issue