Skip to content

Commit

Permalink
chore(refactor): changes to dockerfiles and issue automations (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalCodes authored Aug 15, 2023
1 parent ced0be2 commit c251ac0
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 55 deletions.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ body:
- label: "I am willing to work on this issue (blank for no)."
required: false

- label: "I am a GSSoC23 contributor (blank for no)."
required: false

- type: markdown
attributes:
value: |
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ body:
- label: "I am willing to work on this issue (blank for no)"
required: false

- label: "I am a GSSoC23 contributor (blank for no)."
required: false

- type: markdown
attributes:
value: |
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ body:
- label: "I am willing to work on this issue (blank for no)"
required: false

- label: "I am a GSSoC23 contributor (blank for no)."
required: false

- type: markdown
attributes:
value: |
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ body:
- label: "I am willing to work on this issue (blank for no)"
required: false

- label: "I am a GSSoC23 contributor (blank for no)."
required: false

- type: markdown
attributes:
value: |
Expand Down
22 changes: 14 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Use an official Node.js image as the base image
FROM node:16-alpine
WORKDIR '/app'

COPY package.json .
RUN npm install
COPY . .
# Set the working directory in the container
WORKDIR /app

CMD ["npm","start"]
# Copy package.json and package-lock.json to the container
COPY package*.json ./
COPY vite.config.js .

# Install project dependencies
RUN npm install

# Copy the rest of the application code to the container
COPY . .

# if facing error while building image, paste there two command in terminal.
# Expose the port that the Vite server will run on
EXPOSE 3000

# export DOCKER_BUILDKIT=0
# export COMPOSE_DOCKER_CLI_BUILD=0
# Start the Vite development server
CMD ["npm", "run", "dev"]
16 changes: 16 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.8"

services:
app:
restart: always
container_name: milan-frontend-container
image: milan-frontend
build:
context: .
dockerfile: Dockerfile
volumes:
- ./src:/app/src
ports:
- 3000:3000
env_file:
- .env
34 changes: 0 additions & 34 deletions docker-compose.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"preview": "vite preview",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"prepare": "husky install"
"prepare": "husky install",
"docker-frontend": "docker-compose -f docker-compose.dev.yaml up --build"
},
"browserslist": {
"production": [
Expand Down
8 changes: 8 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ import svgr from "vite-plugin-svgr";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svgr(), react()],
server: {
host: true,
strictPort: true,
port: 3000,
},
watch: {
usePolling: true,
},
});

0 comments on commit c251ac0

Please sign in to comment.