-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
156 changed files
with
1,145 additions
and
718 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,87 @@ | ||
name: Docker Community | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Release NPM] | ||
types: | ||
- completed | ||
push: | ||
branches: | ||
- 'release/**' | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Current Version | ||
run: | | ||
STEEDOS_VERSION=$(node -p 'require("./lerna.json").version') | ||
echo "STEEDOS_VERSION=${STEEDOS_VERSION}" >> $GITHUB_ENV | ||
echo "STEEDOS_VERSION=${STEEDOS_VERSION}" | ||
- name: Generate info.json | ||
run: | | ||
if [[ -f deploy/enterprise/scripts/generate_info_json.sh ]]; then | ||
deploy/enterprise/scripts/generate_info_json.sh | ||
fi | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
with: | ||
driver-opts: network=host | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
steedos/steedos-community | ||
252208178451.dkr.ecr.cn-northwest-1.amazonaws.com.cn/dockerhub/steedos/steedos-community | ||
tags: | | ||
type=semver,pattern={{version}},value=${{ env.STEEDOS_VERSION }} | ||
type=semver,pattern={{major}}.{{minor}},value=${{ env.STEEDOS_VERSION }} | ||
type=semver,pattern={{major}},value=${{ env.STEEDOS_VERSION }} | ||
- uses: docker/login-action@v1 | ||
name: Login Docker Hub | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_NINGXIA }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_NINGXIA }} | ||
aws-region: cn-northwest-1 | ||
- | ||
name: Login to ECR | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: 252208178451.dkr.ecr.cn-northwest-1.amazonaws.com.cn | ||
|
||
- name: Replace Version ~2.5 to Tag | ||
uses: jacobtomlinson/gha-find-replace@v2 | ||
with: | ||
include: deploy/docker/app/platform/package.json | ||
find: "~2.5" | ||
replace: ${{env.STEEDOS_VERSION}} | ||
regex: false | ||
|
||
- name: Build and push docker | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./deploy/docker | ||
platforms: linux/amd64 #,linux/arm64 | ||
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
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,22 @@ | ||
on: | ||
workflow_run: | ||
workflows: [Release NPM] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Sleep 120s, wait for npm cache | ||
uses: juliangruber/sleep-action@v1 | ||
with: | ||
time: 120s | ||
|
||
- name: Sync cnpm | ||
env: | ||
CI: true | ||
run: | | ||
yarn sync | ||
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 |
---|---|---|
|
@@ -17,8 +17,6 @@ body { | |
|
||
zoom: 1 !important; | ||
|
||
// iOS 上平滑滚动 | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
|
||
.steedos { | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
stacks | ||
storage | ||
.env | ||
mongo-data | ||
mongo-data | ||
info.json |
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 |
---|---|---|
@@ -1,35 +1,16 @@ | ||
FROM node:14-slim as builder | ||
FROM node:14-slim | ||
|
||
RUN apt-get update || : && apt-get install -y \ | ||
python \ | ||
curl \ | ||
build-essential | ||
|
||
WORKDIR /app | ||
COPY ./app/platform /app | ||
|
||
ADD package.json . | ||
ADD steedos.config.js . | ||
WORKDIR /app | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN npm i --production && npm cache clean --force | ||
|
||
FROM node:14-slim | ||
|
||
RUN apt-get update \ | ||
&& apt-get install curl -y \ | ||
&& apt-get install -y build-essential \ | ||
&& apt-get clean -y | ||
|
||
WORKDIR / | ||
|
||
RUN mkdir -p /app | ||
|
||
# copy npm scripts | ||
COPY --from=builder /app/package.json ./app/package.json | ||
COPY --from=builder /app/steedos.config.js ./app/steedos.config.js | ||
COPY --from=builder /app/node_modules ./app/node_modules | ||
|
||
WORKDIR /app | ||
RUN yarn --production && yarn cache clean | ||
|
||
CMD ["npm", "start"] | ||
CMD ["yarn", "start"] |
File renamed without changes.
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.