Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
2453b2a
set lang attr on <html> according to user's choice
binotaliu Apr 10, 2020
bdd2de7
set default lang attr for note to 'en'
binotaliu Apr 10, 2020
9b899c7
escape attribute value for lang
binotaliu Apr 10, 2020
3df0903
Convert "include" directives to functions
Aug 22, 2020
0aff524
Make permission labels translatable.
Sep 1, 2020
66fdf7b
Make permission and status translatable
Sep 1, 2020
dec2f98
Make "Expand all" translatable
Sep 3, 2020
ffac645
Remove the semicolons
Sep 11, 2020
ac43db8
Fix matchInContainer false positives
tamo Sep 25, 2020
0ec949d
Add oauth2 authorization
Nov 20, 2020
4002306
Update public/js/index.js
tamo May 12, 2021
ad1bfa6
Update public/js/index.js
tamo May 12, 2021
9343d32
Merge branch 'patch-1' of https://github.com/tamo/codimd into patch-1
May 13, 2021
5e70965
fix: handle when request url has no valid referer
jackycute May 13, 2021
db5fc50
fix: avoid append zero suffix on exporting user data
jackycute May 13, 2021
3af5408
Merge pull request #1680 from hackmdio/bugfix/fix-export-user-data-fi…
a60814billy May 13, 2021
54f6e55
Merge pull request #1679 from hackmdio/bugfix/fix-no-referrer-for-ret…
a60814billy May 13, 2021
a41c4db
fix: S3 client config passing for image upload
jackycute May 13, 2021
e9293b0
feat: add TeX mhchem extensions for MathJax
jackycute May 13, 2021
a913c61
feat: bump package-lock codimd version
jackycute May 18, 2021
b6837f1
feat: upgrade flowchart.js to version 1.15.0
jackycute May 18, 2021
599fd41
Merge pull request #1683 from hackmdio/bugfix/fix-image-upload-s3-config
a60814billy May 19, 2021
b27f147
Merge pull request #1684 from hackmdio/feature/support-mhchem-mathjax
a60814billy May 25, 2021
8c20d9f
Merge pull request #1685 from hackmdio/feature/upgrade-flowchart.js-1…
a60814billy May 25, 2021
2338113
chore: add dev container
a60814billy May 25, 2021
34f502c
Add test and build actions
Yukaii Jun 10, 2021
71dce28
Add doctoc check
Yukaii Jun 10, 2021
2432397
Fix doctoc workflow
Yukaii Jun 10, 2021
dcfdb01
Remove travis CI config
Yukaii Jun 10, 2021
b6d5db3
fix: should not clear guest history when guest pin note
a60814billy Jun 12, 2021
282fcab
Merge pull request #1694 from hackmdio/chore/github-actions
a60814billy Jun 16, 2021
0280a2e
feat: implement CSRF token in export user data
a60814billy Jun 11, 2021
b8203ae
fix: profile dropdown should not set active class
a60814billy Jun 11, 2021
6966881
fix: strip html tags for gist id to avoid stored XSS on showing error…
jackycute Jun 2, 2021
2eefe77
fix: strip html tags for gist file, gist line, gist highlight line, g…
jackycute Jun 9, 2021
e75e28c
feat: upgrade mermaid to version 8.10.1
jackycute May 31, 2021
16a1e82
feat: upgrade mermaid to version 8.10.2
jackycute Jun 16, 2021
82b7800
Merge pull request #1691 from hackmdio/bugfix/fix-gist-id-stored-XSS
a60814billy Jun 16, 2021
e623b72
Merge pull request #1690 from hackmdio/feature/upgrade-mermaid-8.10.1
a60814billy Jun 16, 2021
1bdedf1
Merge pull request #1688 from hackmdio/chore/dev-container
jackycute Jun 16, 2021
9c280b0
Add support for arm64 build
YadominJinta Jul 5, 2021
6b8950d
Merge pull request #1481 from ghost/lang-attr
jackycute Jul 9, 2021
4b78202
Merge pull request #1605 from tamo/patch-1
jackycute Jul 9, 2021
620197f
Merge pull request #1580 from tamo/master
a60814billy Jul 9, 2021
e7a5ea8
Merge pull request #1587 from tamo/more-i18n
a60814billy Jul 9, 2021
3b1e270
Merge pull request #1701 from YadominJinta/develop
a60814billy Jul 9, 2021
b2e2743
fix: may referernce out of bound index in clearDuplicatedHistory
a60814billy Jul 31, 2021
0d1cd1d
feat: add organizations whitelist to GitHub OAuth
jakubgs Aug 20, 2021
80fc6bc
chore: upgrade codemirror to 5.61.3
Yukaii Sep 27, 2021
d627d9f
Documentation - add Music section and move abc abd fretboard to this …
brunetton Sep 15, 2021
5db11d2
Merge pull request #1706 from hackmdio/fix/incorrect-array-index-refe…
Yukaii Oct 15, 2021
e45194e
Merge pull request #1695 from hackmdio/feat/csrf-export-user-data
Yukaii Oct 15, 2021
c013c22
chore: bump meta-marked to 0.5.0
Yukaii Oct 19, 2021
e1ea214
chore: remove unused uglifyjs-webpack-plugin dep
Yukaii Oct 19, 2021
08592f8
feat: deprecate sequelize.import usage
Yukaii Oct 19, 2021
5b564c6
Merge pull request #1724 from hackmdio/refactor/sequelize-import
Yukaii Oct 22, 2021
bfda919
chore: upgrade codemirror to 5.63.2
Yukaii Oct 22, 2021
32f3246
Merge pull request #1716 from hackmdio/chore/upgrade-codemirror
Yukaii Oct 25, 2021
ded6b58
Merge pull request #1723 from hackmdio/chore/remove-uglifyjs
Yukaii Oct 25, 2021
54e5b93
Update README.md to remove IE from supporting list
jackycute Oct 31, 2021
adb0dd5
Fix fence class array initialization
V1ncNet Jan 5, 2022
212d8b3
Update de.json
Jan 16, 2022
be3b2a9
Merge pull request #1741 from rubstudent/develop
a60814billy Jan 18, 2022
ce1b1cc
doc(release-note): Releaes 2.4.1
a60814billy Jan 18, 2022
07cfb29
🐛 [fix] modify replacement rule for disqus short-name
chenxuanzzy Mar 3, 2022
1a38aaa
s3 support multiple cloud providers: https://github.com/hackmdio/codi…
blademainer May 6, 2022
7b1e4e3
s3 support multiple cloud providers: https://github.com/hackmdio/codi…
blademainer May 6, 2022
e6d2b7a
Upgrade Node.js version
inductor Aug 2, 2022
b55bf97
doc(release-note): change release version to 2.4.2
a60814billy Aug 6, 2022
5d84066
Merge pull request #1742 from hackmdio/develop
a60814billy Aug 6, 2022
03f8649
upgrading pg to 8.8.0 to support new scram-sha-256 authentication
phntom Dec 4, 2022
5d72fae
fix: restrict export type and use sandbox to prevent potential attack
galaxian85 Jan 6, 2023
9df1c34
fix: sanitize vimeo video id to prevent XSS
galaxian85 Jan 10, 2023
a7564e7
Merge pull request #1697 from hackmdio/fix/guest-history-pin
jackycute Jan 13, 2023
3ab0b7e
Merge pull request #1762 from blademainer/develop
jackycute Jan 13, 2023
21345ed
Merge pull request #1715 from brunetton/develop
jackycute Jan 13, 2023
a2565bd
Merge pull request #1739 from V1ncNet/hotfix/fence-class
jackycute Jan 13, 2023
8b29d05
Merge pull request #1729 from hackmdio/feature/readme-remove-IE-support
a60814billy Jan 13, 2023
8efc2d0
chore: update formidable to 2.1.1
galaxian85 Jan 7, 2023
1ab2a36
fix: handle error when check is image valid
galaxian85 Jan 7, 2023
30fe18d
Merge pull request #1792 from galaxian85/bugfix/potential-xss-vulnera…
jackycute Jan 13, 2023
19f494d
Merge pull request #1789 from galaxian85/bugfix/invalid-filename-caus…
a60814billy Jan 13, 2023
6a5da1e
Typos + Better translation for "Externals"
eyssette Jan 15, 2023
3a3e892
Merge pull request #1722 from hackmdio/chore/upgrade-meta-marked-to-0…
jackycute Jan 28, 2023
c78bb69
Merge pull request #1793 from eyssette/patch-2
jackycute Jan 28, 2023
ee47c6c
fix(buildpacks): replace custom buildpack with APT buildpack
EtienneM Feb 14, 2023
6ff5a3a
feat: Migrate to gtag and support GA4
assanges Feb 26, 2023
3ea10a6
Update minimum required node.js version to v12
PeterDaveHello Mar 1, 2023
500fe78
Update npm package dependencies
PeterDaveHello Mar 1, 2023
342ff2b
Merge pull request #1797 from EtienneM/develop
jackycute Mar 9, 2023
b09a472
Merge pull request #1790 from galaxian85/bugfix/pandoc-security-issue
jackycute Mar 9, 2023
52bfb9b
Merge pull request #1799 from PeterDaveHello/updateDependenciesBaseline
Yukaii Mar 9, 2023
08e2dcd
Merge pull request #1798 from assanges/feature/support-ga4
jackycute Mar 17, 2023
4399457
reword japanese
AQ-masatoshi-yamaguchi Mar 23, 2023
75d830d
Merge pull request #1802 from AQ-masatoshi-yamaguchi/reword-japanese
jackycute Mar 23, 2023
20e71a3
fix: use encoded note id to update history
bbtfr Apr 10, 2023
298db32
Merge pull request #1804 from bbtfr/fix-note-id
jackycute Jun 5, 2023
8af3638
Merge pull request #1784 from phntom/develop
jackycute Jun 5, 2023
a3a789b
Merge pull request #1710 from status-im/gh-oauth-orgs
jackycute Jun 5, 2023
f1ed885
Merge branch 'develop' into update_node
jackycute Jun 5, 2023
ae38fd3
Merge pull request #1767 from inductor/update_node
jackycute Jun 5, 2023
be1f4cf
Merge pull request #1626 from joachimmathes/oauth2_authorization
jackycute Jun 5, 2023
289db3d
Merge pull request #1750 from chenxuanzzy/bugfix/fix-regex
jackycute Jun 5, 2023
09e7dfe
feat: update package-lock.json
jackycute Jun 5, 2023
03e456f
Revert "feat: update package-lock.json"
jackycute Jun 5, 2023
e2ecaa8
feat: update package-lock.json
jackycute Jun 5, 2023
dd4c236
feat: update package-lock.json
jackycute Jun 5, 2023
5ce1537
fix: js standard code styles
jackycute Jun 5, 2023
c97e224
fix: jsonlint code styles
jackycute Jun 5, 2023
b5b95df
fix: hide exportNoteData form in history page nav
jackycute Jun 5, 2023
c4f607f
Merge pull request #1808 from hackmdio/bugfix/fix-history-nav-ui
jackycute Jun 5, 2023
b6078a6
Update both Traditional and Simplified Chinese locales
PeterDaveHello Jun 18, 2023
192698b
Update npm dependencies with `npm audit fix`, except `markmap-lib`
PeterDaveHello Jun 18, 2023
976bca3
Update npm dependency markmap-lib to ^0.9.3
PeterDaveHello Jun 18, 2023
3f7d202
Update npm dependencies with `npm audit fix` after markmap-lib update
PeterDaveHello Jun 18, 2023
8efa75e
Update node.js version in .nvmrc
PeterDaveHello Jun 18, 2023
b6eba05
Merge pull request #1816 from PeterDaveHello/node.js-14
jackycute Aug 11, 2023
11cd200
fix: sanitize pdf url to prevent xss
EastSun5566 Dec 15, 2023
2a977bc
fix: markmap api changes in 0.9.3
Yukaii Dec 26, 2023
6d95fd1
Merge pull request #1817 from PeterDaveHello/updateDependenciesBaseline
Yukaii Dec 26, 2023
dca7f8c
Merge pull request #1832 from hackmdio/bugfix/sanitize-url-to-prevent…
Yukaii Dec 26, 2023
070808b
Merge pull request #1815 from PeterDaveHello/updateLocales
Yukaii Dec 26, 2023
027a4b4
fix the uploadimage form
hcyuser Aug 9, 2023
96a589d
add newline here to pass the standard lint.
hcyuser Aug 10, 2023
1b1ff89
fix: formidable option API changes
Yukaii Dec 26, 2023
f58c669
Merge pull request #1836 from hackmdio/bugfix/uploadimage-form
stanley2058 Dec 26, 2023
c436af1
fix: logout api should add callback
Yukaii Dec 26, 2023
9790586
Merge pull request #1837 from hackmdio/bugfix/logout-callback
stanley2058 Dec 26, 2023
f8b0301
doc(release-note): release 2.5.0
stanley2058 Dec 26, 2023
9b8a2de
Merge branch 'master' into release/2.5.0
stanley2058 Dec 26, 2023
86bf44f
doc(release-note): update release code name
stanley2058 Dec 26, 2023
afe49f4
doc(release-note): update release note
stanley2058 Dec 26, 2023
78e6663
Merge pull request #1835 from hackmdio/release/2.5.0
jackycute Dec 26, 2023
2a45b58
chore: ⬆️ 上流CodiMD 2.5.0をマージ
Kentaro1043 Oct 8, 2026
6c706a3
style: 🎨 traP独自コードをStandard規約に合わせる
Kentaro1043 Oct 8, 2026
55401c2
fix: 🔧 CIのActionsをSHA固定し実行権限を制限
Kentaro1043 Oct 8, 2026
e10fb8e
fix: 📌 CIのdoctocを既存ロックと同じ版に固定
Kentaro1043 Oct 8, 2026
47508da
fix: 🔒 イメージ作成CIもActions固定と権限制限を適用
Kentaro1043 Oct 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildpacks
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/alex88/heroku-buildpack-vips
https://github.com/Scalingo/apt-buildpack
https://github.com/Scalingo/nodejs-buildpack
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# [Choice] Node.js version: 16, 14
ARG VARIANT=14-buster
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
RUN su node -c "npm install -g npm@6"
58 changes: 58 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "CodiMD",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/zsh",
"sqltools.connections": [{
"name": "Container Database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"database": "codimd",
"username": "codimd",
"password": "codimd"
}],
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"visualstudioexptteam.vscodeintellicode",
"christian-kohler.path-intellisense",
"standard.vscode-standard",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"eamodio.gitlens",
"codestream.codestream",
"github.vscode-pull-request-github",
"cschleiden.vscode-github-actions",
"hbenl.vscode-mocha-test-adapter",
"hbenl.vscode-test-explorer"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

"portsAttributes": {
"3000": {
"label": "CodiMD server",
"onAutoForward": "notify"
},
"5432": {
"label": "PostgreSQL",
"onAutoForward": "notify"
}
},

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
"postCreateCommand": "sudo chown -R node:node node_modules && /workspace/bin/setup",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
46 changes: 46 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3'

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
VARIANT: 14-buster
environment:
- CMD_DB_URL=postgres://codimd:codimd@localhost/codimd
- CMD_USECDN=false
volumes:
- ..:/workspace:cached
- node_modules:/workspace/node_modules:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.

# Uncomment the next line to use a non-root user for all processes.
# user: vscode

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

db:
image: postgres:12.7-alpine
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=codimd
- POSTGRES_PASSWORD=codimd
- POSTGRES_DB=codimd

# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

volumes:
node_modules:
postgres-data:
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'Test and Build'

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/

- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
check-latest: true

- run: npm ci
- run: npm run test:ci
- run: npm run build

doctoc:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.event.pull_request

steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
name: Use Node.js 14
with:
node-version: 14
check-latest: true
- name: Install doctoc-check
run: |
npm install -g doctoc@1.4.0
cp README.md README.md.orig
npm run doctoc
diff -q README.md README.md.orig
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ on:
- traP
- traP-*

permissions:
contents: read

env:
IMAGE_NAME: codimd

jobs:
image:
name: Build Docker Image
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Set IMAGE_TAG env (non traP branch)
Expand All @@ -20,21 +26,22 @@ jobs:
- name: Set IMAGE_TAG env (traP branch)
run: echo "IMAGE_TAG=latest" >> $GITHUB_ENV
if: github.ref == 'refs/heads/traP'
- uses: actions/checkout@v2
- uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
with:
context: .
file: ./deployments/Dockerfile
push: true
build-args: |
RUNTIME=hackmdio/runtime:node-10-cjk-d27854ef
RUNTIME=hackmdio/runtime:16.20.2-35fe7e39
BUILDPACK=hackmdio/buildpack:16.20.2-35fe7e39
tags: |
ghcr.io/traptitech/codimd:${{ env.IMAGE_TAG }}
deploy-staging:
Expand All @@ -43,7 +50,7 @@ jobs:
needs: [image]
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
uses: shimataro/ssh-key-action@87a8f067114a8ce263df83e9ed5c849953548bc3 # v2
with:
key: ${{ secrets.STAGING_SSH_KEY }}
known_hosts: ${{ secrets.STAGING_KNOWN_HOSTS }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.20.1
v16.20.2
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Aptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libvips-dev
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ CodiMD is a service that runs on Node.js, while users use the service through br
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /> Chrome >= 47, Chrome for Android >= 47
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" /> Safari >= 9, iOS Safari >= 8.4
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /> Firefox >= 44
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" /> IE >= 9, Edge >= 12
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" /> Edge >= 12
- <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" /> Opera >= 34, Opera Mini not supported
- Android Browser >= 4.4

Expand Down
8 changes: 8 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
"description": "GitHub API client secret",
"required": false
},
"CMD_GITHUB_ORGANIZATIONS": {
"description": "GitHub whitelist of orgs",
"required": false
},
"CMD_GITHUB_SCOPES": {
"description": "GitHub OAuth API scopes",
"required": false
},
"CMD_BITBUCKET_CLIENTID": {
"description": "Bitbucket API client id",
"required": false
Expand Down
4 changes: 3 additions & 1 deletion config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
},
"github": {
"clientID": "change this",
"clientSecret": "change this"
"clientSecret": "change this",
"organizations": ["names of github organizations allowed, optional"],
"scopes": ["defaults to 'read:user' scope for auth user"]
},
"gitlab": {
"baseURL": "change this",
Expand Down
5 changes: 4 additions & 1 deletion deployments/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG RUNTIME
ARG BUILDPACK

FROM hackmdio/buildpack:node-10-0baafb79 as BUILD
FROM $BUILDPACK as BUILD

COPY --chown=hackmd:hackmd . .
ENV QT_QPA_PLATFORM=offscreen

RUN set -xe && \
git reset --hard && \
Expand All @@ -18,6 +20,7 @@ RUN set -xe && \

FROM $RUNTIME
USER hackmd
ENV QT_QPA_PLATFORM=offscreen
WORKDIR /home/hackmd/app
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
RUN npm install --production && npm cache clean --force && rm -rf /tmp/{core-js-banners,phantomjs}
Expand Down
11 changes: 8 additions & 3 deletions deployments/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail
set -eo pipefail
set -x

if [[ -z $1 || -z $2 ]];then
echo "build.sh [runtime image] [buildpack image]"
exit 1
fi

CURRENT_DIR=$(dirname "$BASH_SOURCE")

GIT_SHA1="$(git rev-parse HEAD)"
Expand All @@ -11,6 +16,6 @@ GIT_TAG=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/

DOCKER_TAG="${GIT_TAG:-$GIT_SHORT_ID}"

docker build --build-arg RUNTIME=hackmdio/runtime:node-10-d27854ef -t "hackmdio/hackmd:$DOCKER_TAG" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
docker build --build-arg RUNTIME=$1 --build-arg BUILDPACK=$2 -t "hackmdio/hackmd:$DOCKER_TAG" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."

docker build --build-arg RUNTIME=hackmdio/runtime:node-10-cjk-d27854ef -t "hackmdio/hackmd:$DOCKER_TAG-cjk" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
docker build --build-arg RUNTIME=$1 --build-arg BUILDPACK=$2 -t "hackmdio/hackmd:$DOCKER_TAG-cjk" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
Loading
Loading