-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Ignore node_modules directory | ||
./zora/node_modules | ||
|
||
# Ignore build output directory | ||
./zora/dist | ||
|
||
# Ignore development server files | ||
.vite | ||
|
||
# Ignore git | ||
./zora/.git | ||
./zora/.github | ||
|
||
# Ignore tests | ||
**/__test__/* |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Use an official Node.js runtime as the base image | ||
FROM node:18-slim as build-stage | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json to the container | ||
COPY zora/package*.json ./ | ||
|
||
# Install app dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application code to the container | ||
COPY ./zora . | ||
|
||
# Copy the custom .env.docker file | ||
COPY .env.docker .env.production | ||
|
||
# Build the Vue.js app | ||
RUN npm run build | ||
|
||
# Set a label | ||
LABEL org.opencontainers.image.source https://github.com/sdss/zora | ||
LABEL org.opencontainers.image.description "zora production image" | ||
|
||
# Copy the files to mountable directory | ||
RUN mkdir -p /app/html | ||
CMD ["cp", "-r", "/app/dist/.", "/app/html"] |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Use an official Node.js runtime as the base image | ||
FROM node:18-slim as dev-stage | ||
|
||
# Set a label | ||
LABEL org.opencontainers.image.source https://github.com/sdss/zora_valis_dockers | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json to the container | ||
COPY ./zora/package*.json ./ | ||
|
||
# Install app dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application code to the container | ||
COPY ./zora . | ||
|
||
# Development environment | ||
FROM dev-stage as build-stage | ||
|
||
# Set a label | ||
LABEL org.opencontainers.image.source https://github.com/sdss/zora | ||
LABEL org.opencontainers.image.description "zora development image" | ||
|
||
# Export port 3000 | ||
EXPOSE 3000 | ||
|
||
# Build the Vue.js app with hot-reloading for dev | ||
CMD ["npm", "run", "dev", "--host"] |