File tree Expand file tree Collapse file tree 5 files changed +115
-3
lines changed Expand file tree Collapse file tree 5 files changed +115
-3
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ .git
3
+ .DS_Store
4
+ build
Original file line number Diff line number Diff line change
1
+ FROM node:18-alpine AS builder
2
+
3
+ # Set working directory inside the container
4
+ WORKDIR /app
5
+
6
+ COPY package*.json ./
7
+
8
+ # Install dependencies with legacy peer deps fix
9
+ RUN npm install --legacy-peer-deps
10
+
11
+ COPY . .
12
+ RUN npm run build
13
+
14
+ # Production Image
15
+ FROM node:18-alpine
16
+ WORKDIR /app
17
+ COPY --from=builder /app /app
18
+ EXPOSE 3000
19
+
20
+ CMD ["npm" , "run" ,"serve" ]
Original file line number Diff line number Diff line change @@ -84,6 +84,52 @@ flowchart LR
84
84
- Push to the branch: `git push origin feature-name`
85
85
- Submit a pull request detailing your changes.
86
86
87
+ ## Project Structure
88
+
89
+ ```
90
+ recode-website/
91
+ |
92
+ ├── .github/ 🔹 GitHub meta files
93
+ | ├── ISSUE_TEMPLATE/
94
+ | ├── workflows/
95
+ | └── pull_request_template.md
96
+ ├── blog/ 🔹Project Blog
97
+ | ├── git-coding-agent/
98
+ | ├── google-backlinks/
99
+ | ├──...
100
+ ├── community/ 🔹 Contributor Docs
101
+ | ├── contributing-guidelines.md
102
+ | ├── index.md
103
+ | ├── our-documentation.md
104
+ | └── understand-lint-checks.md
105
+ ├── docs/ 🔹Documentation
106
+ | ├── GitHub/
107
+ | ├── Google-Student-Ambassador/
108
+ | ├── ...
109
+ ├── src/ 🔹Source Code
110
+ | └── compenents/
111
+ | ├── css/
112
+ | └── custom.css
113
+ | ├── data/
114
+ | ├── database/
115
+ | ├── lib/
116
+ | ├── pages/
117
+ | ├── plugins/
118
+ | ├── services/
119
+ | ├── style/
120
+ | └── globals.css
121
+ | ├── theme/
122
+ | └── utils/
123
+ ├── static/ 🔹 Public Assets
124
+ | ├── icons, img
125
+ | ├── .nojekyll
126
+ | └── *.png
127
+ ├── .gitignore
128
+ ├── CODE_OF_CONDUCT.md
129
+ ├── LICENSE
130
+ ├── README.md
131
+ └── ...
132
+ ```
87
133
88
134
## License
89
135
@@ -136,6 +182,3 @@ Happy open-source contributions and here’s to your career success! 🎉
136
182
< /a>
137
183
138
184
< /div>
139
-
140
-
141
-
Original file line number Diff line number Diff line change
1
+ version : " 3.9"
2
+
3
+ services :
4
+ recodehive :
5
+ build :
6
+ context : .
7
+ ports :
8
+ - " 3000:3000"
9
+ volumes :
10
+ - .:/app
11
+ - /app/node_modules
12
+ working_dir : /app
13
+ command : npm run start
14
+ environment :
15
+ - NODE_ENV=development
Original file line number Diff line number Diff line change
1
+ # Docker Container Setup - Documentation
2
+
3
+ This is the documentation on how to containerize and run the Recodehive website while using Docker.
4
+
5
+ ## Prerequesites
6
+ - [ Docker] ( https://docs.docker.com/engine/install/ ) installed
7
+ - Docker compose installed (Optional)
8
+
9
+ ## Steps
10
+ ### 1. Create a ` Dockerfile ` in the root directory
11
+ This is a text document that contains all the commands needs to build a Docker image. Basically a blue print of a docker image.
12
+
13
+ Key instructions include <br >
14
+ - ` FROM <base_image>:<tag> ` : The first instruction and specifies the base image to build upon.
15
+ - ` WORKDIR <path> ` : Sets the working directory inside the container for subsequent instructions.
16
+ - ` COPY <source> <destination> ` : This instruction copies files or directories from your local machine (the build context) into the Docker image.
17
+ - ` RUN <command> ` : Executes commands during the image build process. This is used for installing dependencies, updating packages etc.
18
+ - ` EXPOSE <port> ` : Informs docker that the container listens on the specified ports at runtime.
19
+
20
+ ### 2. Build the Docker Image
21
+ ``` bash
22
+ docker build -t recodehive-app .
23
+ ```
24
+ This command builds the Docker image using the instructions in the Dockerfile and tags it as recodehive-app.
25
+ ### 3. Run the Container
26
+ ``` bash
27
+ docker run -p 3000:3000 recodehive-app
28
+ ```
29
+ This runs the container and maps port 3000 from the container to your local machine. <br >
30
+ Now Visit http://localhost:3000 to view the site.
You can’t perform that action at this time.
0 commit comments