-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: dockerize * chore: edit Dockerfile * chore: update tag --------- Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
127 additions
and
5 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,71 @@ | ||
name: docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
docker-dev: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=dev | ||
type=semver,pattern=v{{version}}-dev | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: "./Dockerfile" | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
docker-production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=latest | ||
type=semver,pattern=v{{version}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: "./Dockerfile.production" | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:18.18.0-alpine3.18 as build | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN rm -rf build docs | ||
|
||
WORKDIR /app/docusaurus | ||
|
||
RUN yarn install | ||
|
||
CMD [ "yarn", "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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:18.18.0-alpine3.18 as build | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
WORKDIR /app/docusaurus | ||
|
||
RUN yarn install | ||
RUN yarn build | ||
|
||
FROM nginx:stable-alpine | ||
|
||
COPY --from=build /app/docusaurus/build /usr/share/nginx/html/ |
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,29 @@ | ||
version: "3" | ||
|
||
services: | ||
docusaurus: | ||
image: ghcr.io/gnolang/docs.gno.land:dev | ||
build: | ||
context: . | ||
volumes: | ||
- .:/app/docs | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
- MEILISEARCH_URL="localhost:7700" | ||
- MEILISEARCH_API_KEY="masterKey" | ||
- MEILISEARCH_INDEX_UID="dev" | ||
|
||
meilisearch: | ||
image: getmeili/meilisearch | ||
restart: unless-stopped | ||
environment: | ||
- MEILI_MASTER_KEY=masterKey | ||
- MEILI_NO_ANALYTICS=true | ||
- MEILI_ENV=dev | ||
- MEILI_LOG_LEVEL=info | ||
- MEILI_DB_PATH=/data.ms | ||
ports: | ||
- 7700:7700 | ||
#volumes: | ||
# - ./data.ms:/data.ms |