-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1742 from hackmdio/develop
Release 2.4.2
- Loading branch information
Showing
35 changed files
with
506 additions
and
327 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,14 @@ | ||
# [Choice] Node.js version: 16, 14, 12 | ||
ARG VARIANT=12-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" |
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,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" | ||
} |
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,46 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
args: | ||
VARIANT: 12-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: |
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,51 @@ | ||
name: 'Test and Build' | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-and-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- uses: actions/setup-node@v2 | ||
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@v2 | ||
- uses: actions/setup-node@v2 | ||
name: Use Node.js 12 | ||
with: | ||
node-version: 12 | ||
check-latest: true | ||
- name: Install doctoc-check | ||
run: | | ||
npm install -g doctoc | ||
cp README.md README.md.orig | ||
npm run doctoc | ||
diff -q README.md README.md.orig |
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
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
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
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
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.