15 Commits

Author SHA1 Message Date
Tom Wright
f29815757f Bump some versions 2023-08-29 17:51:39 +01:00
Tom Wright
c4e03f7d41 Merge pull request #122 from docker-parfum/improve_dockerfile
Improve Dockerfile to reduce image size
2023-01-11 12:17:13 +00:00
tdurieux
ebdbb8114d Improve Dockerfile to reduce image size 2023-01-11 11:37:56 +01:00
Tom Wright
8e60a78488 Merge pull request #109 from TomWright/dependabot/docker/golang-1.19.3-buster
Bump golang from 1.19.2-buster to 1.19.3-buster
2022-11-08 13:31:57 +00:00
dependabot[bot]
4f223cf2b6 Bump golang from 1.19.2-buster to 1.19.3-buster
Bumps golang from 1.19.2-buster to 1.19.3-buster.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-07 07:01:26 +00:00
Tom Wright
c32a3f4e07 Merge pull request #102 from TomWright/dependabot/npm_and_yarn/mermaidcli/mermaid-js/mermaid-cli-9.1.7
Bump @mermaid-js/mermaid-cli from 9.1.3 to 9.1.7 in /mermaidcli
2022-10-11 16:08:38 +01:00
dependabot[bot]
28fcde504e Bump @mermaid-js/mermaid-cli from 9.1.3 to 9.1.7 in /mermaidcli
Bumps [@mermaid-js/mermaid-cli](https://github.com/mermaid-js/mermaid-cli) from 9.1.3 to 9.1.7.
- [Release notes](https://github.com/mermaid-js/mermaid-cli/releases)
- [Commits](https://github.com/mermaid-js/mermaid-cli/compare/9.1.3...9.1.7)

---
updated-dependencies:
- dependency-name: "@mermaid-js/mermaid-cli"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 15:08:29 +00:00
Tom Wright
e1a05b7b9f Merge pull request #104 from TomWright/dependabot/docker/golang-1.19.2-buster
Bump golang from 1.18.3-buster to 1.19.2-buster
2022-10-11 16:08:22 +01:00
Tom Wright
2f8b051ee7 Merge pull request #100 from TomWright/dependabot/docker/node-18.10.0-buster-slim
Bump node from 18.5.0-buster-slim to 18.10.0-buster-slim
2022-10-11 16:08:09 +01:00
Tom Wright
fa659f08f5 Merge pull request #101 from TomWright/dependabot/npm_and_yarn/mermaidcli/d3-color-and-mermaid-js/mermaid-cli--removed
Bump d3-color and @mermaid-js/mermaid-cli in /mermaidcli
2022-10-11 16:07:51 +01:00
Tom Wright
2a9b4e6b86 Merge pull request #105 from TomWright/dependabot/github_actions/actions/cache-3.0.10
Bump actions/cache from 3.0.4 to 3.0.10
2022-10-11 16:07:39 +01:00
dependabot[bot]
b9c837ecde Bump golang from 1.18.3-buster to 1.19.2-buster
Bumps golang from 1.18.3-buster to 1.19.2-buster.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 07:08:16 +00:00
dependabot[bot]
1aaab54ad4 Bump actions/cache from 3.0.4 to 3.0.10
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.4 to 3.0.10.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.4...v3.0.10)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 07:08:16 +00:00
dependabot[bot]
ffbec0401d Bump d3-color and @mermaid-js/mermaid-cli in /mermaidcli
Removes [d3-color](https://github.com/d3/d3-color). It's no longer used after updating ancestor dependency [@mermaid-js/mermaid-cli](https://github.com/mermaid-js/mermaid-cli). These dependencies need to be updated together.


Removes `d3-color`

Updates `@mermaid-js/mermaid-cli` from 9.1.3 to 9.1.6
- [Release notes](https://github.com/mermaid-js/mermaid-cli/releases)
- [Commits](https://github.com/mermaid-js/mermaid-cli/compare/9.1.3...9.1.6)

---
updated-dependencies:
- dependency-name: d3-color
  dependency-type: indirect
- dependency-name: "@mermaid-js/mermaid-cli"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 03:11:09 +00:00
dependabot[bot]
a4917536eb Bump node from 18.5.0-buster-slim to 18.10.0-buster-slim
Bumps node from 18.5.0-buster-slim to 18.10.0-buster-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-29 15:37:33 +00:00
7 changed files with 722 additions and 901 deletions

View File

@@ -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:

View File

@@ -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') }}

View File

@@ -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

View File

@@ -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
View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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"
} }
} }