-
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
134 changed files
with
1,408 additions
and
461 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 |
---|---|---|
|
@@ -192,6 +192,7 @@ jobs: | |
git config user.email [email protected] | ||
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN | ||
yarn lerna publish ${{ steps.branch-name.outputs.tag }} --no-git-tag-version --no-git-reset --force-publish --exact --yes --dist-tag beta | ||
git pull | ||
git add . | ||
git commit -m "action: release ${{ steps.branch-name.outputs.tag }}" | ||
git push | ||
|
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 |
---|---|---|
|
@@ -9,5 +9,4 @@ module.exports = { | |
started(broker) { | ||
broker.createService(require("@steedos/service-community")); | ||
}, | ||
|
||
}; |
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,2 @@ | ||
stacks | ||
.env |
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,78 @@ | ||
FROM node:14-slim | ||
|
||
RUN apt-get update || : && apt-get install -y \ | ||
python \ | ||
curl \ | ||
build-essential | ||
|
||
# Install MongoDB 4.4 | ||
# https://www.mongodb.com/docs/v4.4/tutorial/install-mongodb-on-debian/ | ||
RUN apt-get update \ | ||
&& apt-get install -y gnupg curl | ||
|
||
RUN curl -fsSL https://pgp.mongodb.com/server-4.4.asc | \ | ||
gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg \ | ||
--dearmor --no-tty | ||
|
||
RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y mongodb-org=4.4.24 mongodb-org-server=4.4.24 mongodb-org-shell=4.4.24 mongodb-org-mongos=4.4.24 mongodb-org-tools=4.4.24 \ | ||
&& apt-get autoremove --yes \ | ||
&& apt-get clean -y | ||
|
||
# Install nginx && redis | ||
RUN apt-get update \ | ||
&& apt-get install -y nginx nginx-extras redis-server \ | ||
&& apt-get install -y cron supervisor git python-pip \ | ||
# && pip install --no-cache-dir git+https://github.com/coderanger/supervisor-stdout@973ba19967cdaf46d9c1634d1675fc65b9574f6e \ | ||
&& pip install supervisor-stdout \ | ||
&& apt-get remove -y git python-pip \ | ||
&& apt-get clean -y | ||
|
||
COPY ./fs/app /app | ||
|
||
ENV NODE_ENV=production | ||
|
||
|
||
WORKDIR /app/platform | ||
|
||
RUN npm i --production && npm cache clean --force | ||
|
||
WORKDIR /app/unpkg | ||
|
||
RUN npm i --production && npm cache clean --force | ||
|
||
|
||
# Remove cached files | ||
RUN rm -rf \ | ||
/root/.cache \ | ||
/root/.npm \ | ||
/root/.pip \ | ||
/usr/local/share/doc \ | ||
/usr/share/doc \ | ||
/usr/share/man \ | ||
/var/lib/apt/lists/* \ | ||
/tmp/* | ||
|
||
COPY ./fs/etc /etc | ||
COPY ./fs/opt /opt | ||
|
||
# ENV defaults | ||
ENV ROOT_URL=http://127.0.0.1:3000 \ | ||
PORT=3000 \ | ||
NODE_ENV=production | ||
|
||
# ------------------------------------------------------------------------ | ||
ENV TMP /tmp/steedos | ||
|
||
# Define volumes - Service Layer | ||
VOLUME [ "/steedos-stacks" ] | ||
|
||
WORKDIR /opt/steedos/platform | ||
|
||
ENTRYPOINT [ "/opt/steedos/entrypoint.sh" ] | ||
|
||
HEALTHCHECK --interval=15s --timeout=15s --start-period=45s CMD "/opt/steedos/healthcheck.sh" | ||
|
||
CMD ["/usr/bin/supervisord", "-n"] |
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,4 +1,4 @@ | ||
快速试用华炎魔方 | ||
华炎魔方企业版 | ||
=== | ||
|
||
## 安装前准备 | ||
|
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,20 @@ | ||
version: "3.9" | ||
|
||
services: | ||
|
||
steedos: | ||
build: | ||
context: ./ | ||
dockerfile: ./Dockerfile | ||
image: steedos/steedos-enterprise:latest | ||
ports: | ||
- "80:80" # Nginx | ||
- "443:443" # Nginx SSL | ||
- "3000:3000" # Steedos Platform | ||
- "3100:3100" # Unpkg | ||
- "9001:9001" # Supervisor | ||
environment: | ||
- ROOT_URL=http://127.0.0.1:3000 | ||
volumes: | ||
- "./stacks:/steedos-stacks" | ||
|
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,11 @@ | ||
{ | ||
"name": "steedos-enterprise", | ||
"private": true, | ||
"scripts": { | ||
"start": "steedos start" | ||
}, | ||
"dependencies": { | ||
"@steedos/service-community": "~2.5", | ||
"@steedos/service-enterprise": "~2.5" | ||
} | ||
} |
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 @@ | ||
module.exports = { | ||
// Namespace of nodes to segment your nodes on the same network. | ||
namespace: "steedos", | ||
// Default log level for built-in console logger. It can be overwritten in logger options above. | ||
// Available values: trace, debug, info, warn, error, fatal | ||
logLevel: "warn", | ||
|
||
// Called after broker started. | ||
started(broker) { | ||
broker.createService(require("@steedos/service-community")); | ||
broker.createService(require("@steedos/service-enterprise")); | ||
}, | ||
|
||
}; |
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 @@ | ||
{ | ||
"name": "unpkg", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@steedos/ee_unpkg": "0.0.2" | ||
} | ||
} |
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,8 @@ | ||
const createServer = require("@steedos/ee_unpkg"); | ||
|
||
const server = createServer(); | ||
const port = process.env.UNPKG_PORT || '3100'; | ||
|
||
server.listen(port, () => { | ||
console.log('Unpkg Server listening on port %s, Ctrl+C to quit', port); | ||
}); |
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 @@ | ||
* * * * 0 root exec /opt/steedos/renew-certificate.sh |
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,44 @@ | ||
; supervisor config file | ||
|
||
[unix_http_server] | ||
file=%(ENV_TMP)s/supervisor.sock ; (the path to the socket file) | ||
chmod=0700 ; sockef file mode (default 0700) | ||
|
||
[inet_http_server] ; inet (TCP) server disabled by default | ||
port=*:9001 ; (ip_address:port specifier, *:port for all iface) | ||
username=%(ENV_STEEDOS_SUPERVISOR_USER)s | ||
password=%(ENV_STEEDOS_SUPERVISOR_PASSWORD)s | ||
|
||
[supervisord] | ||
logfile=/steedos-stacks/logs/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) | ||
pidfile=%(ENV_TMP)s/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | ||
childlogdir=/steedos-stacks/logs/supervisor ; ('AUTO' child log dir, default $TEMP) | ||
stdout_logfile_maxbytes = 0 | ||
stderr_logfile_maxbytes = 0 | ||
|
||
; the below section must remain in the config file for RPC | ||
; (supervisorctl/web interface) to work, additional interfaces may be | ||
; added by defining them in separate rpcinterface: sections | ||
[rpcinterface:supervisor] | ||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
||
[supervisorctl] | ||
serverurl=unix://%(ENV_TMP)s/supervisor.sock ; use a unix:// URL for a unix socket | ||
|
||
; The [include] section can just contain the "files" setting. This | ||
; setting can list multiple files (separated by whitespace or | ||
; newlines). It can also contain wildcards. The filenames are | ||
; interpreted as relative to this file. Included files *cannot* | ||
; include files themselves. | ||
|
||
[include] | ||
files = %(ENV_SUPERVISORD_CONF_TARGET)s/*.conf | ||
|
||
; This event listener is used to capture processes log | ||
; and forward to container log using supervisor_stdout | ||
; Ref: https://github.com/coderanger/supervisor-stdout | ||
[eventlistener:stdout] | ||
command = supervisor_stdout | ||
buffer_size = 100 | ||
events = PROCESS_LOG | ||
result_handler = supervisor_stdout:event_handler |
Oops, something went wrong.