chore: update water data sets and migrate docker configuration to directory-based structure
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/push Build encountered an error
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Stage 1: Build the React Application
|
||||
FROM node:20 AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Serve the application with Apache
|
||||
FROM --platform=linux/amd64 php:8.4-apache
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Enable necessary Apache modules
|
||||
RUN a2enmod rewrite headers
|
||||
|
||||
COPY Docker/vhost.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Copy the built application from the build stage
|
||||
COPY --from=build /app/dist /app/dist
|
||||
|
||||
# Ensure correct permissions
|
||||
RUN chown -R www-data:www-data /app
|
||||
|
||||
# Keep original PHP extensions just in case
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user