-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a build container to make it easier for people without NodeJS/npm to run the website locally. Signed-off-by: Janos Bonic <[email protected]>
- Loading branch information
Janos
authored
Nov 29, 2023
1 parent
0e17a36
commit 80f7dbf
Showing
3 changed files
with
46 additions
and
8 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,8 @@ | ||
FROM node:18 | ||
|
||
WORKDIR /work | ||
COPY package.json /work | ||
COPY package-lock.json /work | ||
RUN npm i | ||
|
||
CMD ["npm", "run", "start", "--", "--host","0.0.0.0"] |
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 |
---|---|---|
|
@@ -8,29 +8,48 @@ | |
- TypeScript | ||
- Tailwind CSS | ||
|
||
## Getting Started | ||
## Working with this repository | ||
|
||
1. Clone the repository | ||
### Cloning the repository | ||
|
||
This repository uses git submodules to pull in the [main OpenTofu repository](https://github.com/opentofu/opentofu). | ||
You can clone it using the following two steps: | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone [email protected]:opentofu/opentofu.org.git | ||
``` | ||
|
||
2. Install dependencies | ||
2. Fetch the documentation: | ||
|
||
```bash | ||
npm i | ||
git submodule init | ||
git submodule update | ||
``` | ||
|
||
3. Fetch the documentation | ||
### Running the dev server locally | ||
|
||
You can run the dev server if you have a local NodeJS/npm environment installed: | ||
|
||
1. Install dependencies: | ||
|
||
```bash | ||
git submodule init | ||
git submodule update | ||
npm i | ||
``` | ||
|
||
4. Start the development server | ||
2. Start the development server: | ||
|
||
```bash | ||
npm run start | ||
``` | ||
|
||
You can now access the site locally at http://localhost:3000/ | ||
|
||
### Running the dev server in a container | ||
|
||
You can also run the dev server in a container with the following command: | ||
|
||
```bash | ||
docker compose up --build | ||
``` |
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,11 @@ | ||
version: '3.8' | ||
services: | ||
website: | ||
build: . | ||
volumes: | ||
- source: ./ | ||
target: /work | ||
type: bind | ||
- /work/node_modules | ||
ports: | ||
- "3000:3000" |