-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nolaib/migrate-to-vite
- Loading branch information
Showing
16 changed files
with
17,245 additions
and
4,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
REACT_APP_STARKNET_NODE_URL=http://178.32.172.148:6060 | ||
REACT_APP_BACKEND_URL=http://localhost:8000 | ||
REACT_APP_IS_DEV=true | ||
VITE_STARKNET_NODE_URL=http://178.32.172.148:6060 | ||
VITE_BACKEND_URL=http://localhost:8000 | ||
VITE_IS_DEV=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
# Dockerfile.nginx | ||
|
||
# Stage 1: Build the React app | ||
# Stage 1: Build the Vite app | ||
FROM node:20-alpine AS build | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN yarn | ||
# Copy package.json and yarn.lock first to leverage Docker's caching | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dependencies (including Vite) | ||
RUN yarn install | ||
|
||
# Copy the rest of the application files | ||
COPY . . | ||
|
||
# Build the Vite app | ||
RUN yarn build | ||
|
||
# Stage 2: Set up Nginx to serve the built app | ||
# Stage 2: Serve the built app using Nginx | ||
FROM nginx:alpine | ||
|
||
COPY --from=build /app/build /usr/share/nginx/html | ||
# Copy the built files from the previous stage to the Nginx HTML directory | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
|
||
# Remove the default Nginx config file and replace it with your custom one | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY spotnet.conf /etc/nginx/conf.d | ||
COPY spotnet.conf /etc/nginx/conf.d/ | ||
|
||
# Expose port 80 for HTTP traffic | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
# Start Nginx in the foreground | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
# Dockerfile.nginx | ||
|
||
# Stage 1: Build the React app | ||
# Stage 1: Build the Vite app | ||
FROM node:20-alpine AS build | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
COPY . /app | ||
|
||
COPY .env.dev .env | ||
# Copy package.json and yarn.lock first to leverage Docker's caching | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dependencies (including Vite) | ||
RUN yarn install | ||
|
||
RUN yarn | ||
RUN yarn test | ||
# Copy the rest of the application files | ||
COPY . . | ||
|
||
# Build the Vite app for development (optional: use `dev` for specific dev builds if needed) | ||
RUN yarn build | ||
|
||
# Stage 2: Set up Nginx to serve the built app | ||
# Stage 2: Serve the built app using Nginx for development | ||
FROM nginx:alpine | ||
|
||
COPY --from=build /app/build /usr/share/nginx/html | ||
# Copy the built files from the previous stage to the Nginx HTML directory | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
|
||
# Remove the default Nginx config file and replace it with your custom one | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY spotnet_dev.conf /etc/nginx/conf.d | ||
COPY spotnet_dev.conf /etc/nginx/conf.d/ | ||
|
||
# Expose port 80 for HTTP traffic | ||
EXPOSE 80 | ||
|
||
# Start Nginx in the foreground (daemon off) | ||
CMD ["nginx", "-g", "daemon off;"] |
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.