changed folder structure and added readme file

This commit is contained in:
X4Lo committed 2025-01-25 06:13:29 +01:00
1 parent cbdffb21e3
commit 3bb0935db9
50 files changed
+6600 -3999

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
# Stage 1: Build the Angular application
FROM node:18.19.1-alpine AS build
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json to install dependencies
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application files
COPY . .
ARG API_URL
ARG TMDB_API_KEY
RUN sed -i "s|%%API_URL%%|${API_URL}|g" src/environments/environment.prod.ts
RUN sed -i "s|%%TMDB_API_KEY%%|${TMDB_API_KEY}|g" /src/environments/environment.prod.ts
# Build the Angular app with a custom base-href
RUN npm run electron-build:ng
# Stage 2: Serve the Angular app with a lightweight web server
FROM nginx:alpine
# Copy the built Angular app from the build stage
COPY --from=build /app/dist/showy/browser /usr/share/nginx/html
# Copy a custom Nginx configuration (optional, if needed)
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose the default Nginx HTTP port
EXPOSE 80
# Start the Nginx server
CMD ["nginx", "-g", "daemon off;"]