Compare commits
16 Commits
cors
...
version-bu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f29815757f | ||
|
|
c4e03f7d41 | ||
|
|
ebdbb8114d | ||
|
|
8e60a78488 | ||
|
|
4f223cf2b6 | ||
|
|
c32a3f4e07 | ||
|
|
28fcde504e | ||
|
|
e1a05b7b9f | ||
|
|
2f8b051ee7 | ||
|
|
fa659f08f5 | ||
|
|
2a9b4e6b86 | ||
|
|
b9c837ecde | ||
|
|
1aaab54ad4 | ||
|
|
ffbec0401d | ||
|
|
a4917536eb | ||
|
|
f37d02c6a7 |
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@@ -7,7 +7,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.16.x]
|
go-version: [1.21.x]
|
||||||
platform: [ubuntu-latest]
|
platform: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
4
.github/workflows/test.yaml
vendored
4
.github/workflows/test.yaml
vendored
@@ -4,7 +4,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.16.x]
|
go-version: [1.21.x]
|
||||||
platform: [ubuntu-latest]
|
platform: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v3.0.4
|
- uses: actions/cache@v3.0.10
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# This stage builds the go executable.
|
# This stage builds the go executable.
|
||||||
FROM golang:1.18.3-buster as go
|
FROM golang:1.21.0-alpine as go
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
@@ -10,14 +10,14 @@ RUN go build -o bin/app cmd/app/main.go
|
|||||||
# Final stage that will be pushed.
|
# Final stage that will be pushed.
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
|
||||||
FROM node:18.5.0-buster-slim as node
|
FROM node:18.10.0-buster-slim as node
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
# copy the mermaidcli node package into the container and install
|
# copy the mermaidcli node package into the container and install
|
||||||
COPY ./mermaidcli/* ./
|
COPY ./mermaidcli/* ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install && npm cache clean --force;
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update 2>/dev/null && \
|
RUN apt-get update 2>/dev/null && \
|
||||||
@@ -65,7 +65,7 @@ RUN apt-get update 2>/dev/null && \
|
|||||||
xdg-utils \
|
xdg-utils \
|
||||||
wget \
|
wget \
|
||||||
libxshmfence1 \
|
libxshmfence1 \
|
||||||
2>/dev/null
|
2>/dev/null && rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
COPY --from=go /root/bin/app ./app
|
COPY --from=go /root/bin/app ./app
|
||||||
|
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -2,10 +2,10 @@ DOCKER_IMAGE=tomwright/mermaid-server:latest
|
|||||||
CONTAINER_NAME=mermaid-server
|
CONTAINER_NAME=mermaid-server
|
||||||
|
|
||||||
docker-image:
|
docker-image:
|
||||||
docker build -t ${DOCKER_IMAGE} .
|
docker build --platform linux/x86_64 -t ${DOCKER_IMAGE} .
|
||||||
|
|
||||||
docker-run:
|
docker-run:
|
||||||
docker run -d --name ${CONTAINER_NAME} -p 80:80 ${DOCKER_IMAGE}
|
docker run -d --platform linux/x86_64 --name ${CONTAINER_NAME} -p 80:80 ${DOCKER_IMAGE}
|
||||||
|
|
||||||
docker-stop:
|
docker-stop:
|
||||||
docker stop ${CONTAINER_NAME} || true
|
docker stop ${CONTAINER_NAME} || true
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module github.com/tomwright/mermaid-server
|
module github.com/tomwright/mermaid-server
|
||||||
|
|
||||||
go 1.15
|
go 1.21
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/tomwright/grace v0.1.2
|
github.com/tomwright/grace v0.1.2
|
||||||
|
|||||||
1601
mermaidcli/package-lock.json
generated
1601
mermaidcli/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,6 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mermaid-js/mermaid-cli": "^9.1.3"
|
"@mermaid-js/mermaid-cli": "^10.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user