mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-23 15:40:07 -06:00
website: Dev server (#971)
Signed-off-by: Janos Bonic <86970079+janosdebugs@users.noreply.github.com>
This commit is contained in:
parent
644d8afdb0
commit
a27f1b48ba
26
.github/workflows/website.yml
vendored
Normal file
26
.github/workflows/website.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Website checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'v[0-9]+.[0-9]+'
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Prepare website container
|
||||
run: docker compose -f docker-compose.build.yml build
|
||||
working-directory: website
|
||||
- name: Build website
|
||||
run: docker compose -f docker-compose.build.yml up --exit-code-from website
|
||||
working-directory: website
|
14
website/Dockerfile
Normal file
14
website/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM alpine AS parent
|
||||
|
||||
RUN apk add git
|
||||
RUN git clone https://github.com/opentofu/opentofu.org /work
|
||||
|
||||
FROM node
|
||||
COPY --from=parent /work /work
|
||||
WORKDIR /work
|
||||
RUN npm i
|
||||
|
||||
VOLUME /work/opentofu-repo
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "run", "start", "--", "--host","0.0.0.0"]
|
@ -2,6 +2,16 @@
|
||||
|
||||
This directory contains the portions of [the OpenTofu website](https://opentofu.org) that pertain to the core functionality, excluding providers and the overall configuration.
|
||||
|
||||
## Development server
|
||||
|
||||
You can start a local development server with Docker by running the following command from this (the `website`) directory:
|
||||
|
||||
```
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
The development server will be available on http://localhost:3000/ .
|
||||
|
||||
## Suggesting Changes
|
||||
|
||||
You can [submit an issue](https://github.com/opentofu/opentofu/issues/new/choose) with documentation requests or submit a pull request with suggested changes.
|
||||
|
13
website/docker-compose.build.yml
Normal file
13
website/docker-compose.build.yml
Normal file
@ -0,0 +1,13 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
website:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ../:/work/opentofu-repo
|
||||
command:
|
||||
- npm
|
||||
- run
|
||||
- build
|
||||
restart: no
|
8
website/docker-compose.yml
Normal file
8
website/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
website:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ../:/work/opentofu-repo
|
Loading…
Reference in New Issue
Block a user