-
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
13 changed files
with
24,801 additions
and
19,085 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,53 @@ | ||
name: Build release Docker image | ||
|
||
on: | ||
# Trigger the action manually from the UI | ||
workflow_dispatch: | ||
# Trigger the action when I create or push a `master` branch | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
DOCKER_IMAGE_NAME: erethon-docs | ||
DOCKER_REGISTRY_URL: ${{ secrets.PRIVATE_REGISTRY_URL }} | ||
|
||
jobs: | ||
build_docker_images: | ||
# Job name that shows in the GitHub UI | ||
name: Build Docker Images | ||
# Runner to use | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.PRIVATE_REGISTRY_URL }} | ||
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }} | ||
password: ${{ secrets.PRIVATE_REGISTRY_PASSWORD }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Build the Docker image | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag $DOCKER_IMAGE_NAME:latest | ||
|
||
# Tag the image | ||
- name: Create a latest image as well | ||
run: docker tag $DOCKER_IMAGE_NAME:latest $DOCKER_REGISTRY_URL/$DOCKER_IMAGE_NAME:latest | ||
|
||
# Push the image to the registry | ||
- name: Push the Docker image with version number | ||
run: docker push $DOCKER_REGISTRY_URL/$DOCKER_IMAGE_NAME:latest | ||
|
||
# Remove the local images | ||
- name: Remove the Docker image with version number | ||
run: docker rmi $DOCKER_REGISTRY_URL/$DOCKER_IMAGE_NAME:latest | ||
|
||
- name: Remove the local image | ||
run: docker rmi $DOCKER_IMAGE_NAME:latest | ||
|
||
- name: Trigger Docker re-deployment | ||
run: | | ||
curl -H "Authorization: Bearer ${{ secrets.DEPLOYMENT_TOKEN }}" ${{ secrets.DEPLOYMENT_URL }} |
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,45 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Stage 1: Base image. | ||
## Start with a base image containing NodeJS so we can build Docusaurus. | ||
FROM node:lts as base | ||
## Disable colour output from yarn to make logs easier to read. | ||
ENV FORCE_COLOR=0 | ||
## Enable corepack. | ||
RUN corepack enable | ||
## Set the working directory to `/opt/docusaurus`. | ||
WORKDIR /opt/docusaurus | ||
|
||
# Stage 2a: Development mode. | ||
FROM base as dev | ||
## Set the working directory to `/opt/docusaurus`. | ||
WORKDIR /opt/docusaurus | ||
## Expose the port that Docusaurus will run on. | ||
EXPOSE 3000 | ||
## Run the development server. | ||
CMD [ -d "node_modules" ] && npm run start --host 0.0.0.0 --poll 1000 || npm run install && npm run start --host 0.0.0.0 --poll 1000 | ||
|
||
# Stage 2b: Production build mode. | ||
FROM base as prod | ||
## Set the working directory to `/opt/docusaurus`. | ||
WORKDIR /opt/docusaurus | ||
## Copy over the source code. | ||
COPY . /opt/docusaurus/ | ||
## Install dependencies with `--immutable` to ensure reproducibility. | ||
RUN npm ci | ||
## Build the static site. | ||
RUN npm run build | ||
|
||
# Stage 3a: Serve with `docusaurus serve`. | ||
FROM prod as serve | ||
## Expose the port that Docusaurus will run on. | ||
EXPOSE 3000 | ||
## Run the production server. | ||
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"] | ||
|
||
# Stage 3b: Serve with Caddy. | ||
FROM caddy:2-alpine as caddy | ||
## Copy the Caddyfile. | ||
COPY --from=prod /opt/docusaurus/Caddyfile /etc/caddy/Caddyfile | ||
## Copy the Docusaurus build output. | ||
COPY --from=prod /opt/docusaurus/build /var/docusaurus |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
{ | ||
"label": "DREShips", | ||
"position": 3 | ||
} |
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,5 @@ | ||
--- | ||
title: Introduction | ||
sidebar_position: 1 | ||
--- | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"label": "DungeonsXL", | ||
"position": 4 | ||
"position": 2 | ||
} |
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
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
Oops, something went wrong.