Compare commits

..

112 Commits

Author SHA1 Message Date
standardci
787eedc8af chore(release): publish new version
- @standardnotes/analytics@2.19.16
 - @standardnotes/api-gateway@1.46.11
 - @standardnotes/auth-server@1.87.12
 - @standardnotes/files-server@1.9.15
 - @standardnotes/revisions-server@1.10.28
 - @standardnotes/scheduler-server@1.16.19
 - @standardnotes/syncing-server@1.29.14
 - @standardnotes/websockets-server@1.5.20
 - @standardnotes/workspace-server@1.19.23
2023-02-06 14:37:52 +00:00
Karol Sójko
040a2b5e5f chore: fix e2e workflow 2023-02-06 15:35:49 +01:00
Karol Sójko
347ee275fa Merge pull request #437 from standardnotes/supervisor
feat: self-hosted setup with one container
2023-02-06 15:34:44 +01:00
Karol Sójko
1c0a9e6726 fix: e2e test suite 2023-02-06 15:34:26 +01:00
Karol Sójko
c4f038ab9a remove @ from common 2023-02-06 15:29:50 +01:00
Karol Sójko
3746ac5fc1 change branch 2023-02-06 15:29:18 +01:00
Karol Sójko
5c4353dd0c extract e2e suite 2023-02-06 15:28:14 +01:00
Karol Sójko
f64caed220 fix: remove login docker from pr 2023-02-06 15:10:51 +01:00
Karol Sójko
863d590292 fix: dockerfile build output 2023-02-06 15:08:03 +01:00
Karol Sójko
0dcf64c82b fix: using mocha 2023-02-06 14:59:24 +01:00
Karol Sójko
48fd5c5ff6 fix: remove command from workflow services 2023-02-06 14:53:16 +01:00
Karol Sójko
84fa374072 fix: workflow env vars 2023-02-06 14:52:28 +01:00
Karol Sójko
2313b0b450 fix: eof empty line 2023-02-06 14:51:18 +01:00
Karol Sójko
4fa6f579af run e2e tests on pr 2023-02-06 14:48:26 +01:00
Karol Sójko
08c1328932 add publishing self hosting image 2023-02-06 13:49:18 +01:00
Karol Sójko
4586308210 add missing depepndabot checks 2023-02-06 13:38:18 +01:00
Karol Sójko
5aa561dcb2 add localstack 2023-02-06 13:35:58 +01:00
Karol Sójko
e07612fe24 remove redis events channels 2023-02-06 11:31:47 +01:00
Karol Sójko
c9289204c4 revisions setup 2023-02-06 11:20:11 +01:00
Karol Sójko
51bb1081a6 files setup 2023-02-06 07:33:16 +01:00
Karol Sójko
25066bb33c syncing server setup 2023-02-06 07:12:25 +01:00
Karol Sójko
bfdb176445 running auth setup 2023-02-06 06:52:11 +01:00
Karol Sójko
42233fa756 auth & auth-worker wip 2023-02-03 17:44:30 +01:00
Karol Sójko
55de4319ed feat: add initial supervisor setup 2023-02-03 11:26:06 +01:00
standardci
306f6edd4e chore(release): publish new version
- @standardnotes/auth-server@1.87.11
2023-02-02 13:52:33 +00:00
Karol Sójko
bf55bbccd9 Revert "fix(auth): disallow adding u2f devices if a user does not have 2fa enabled"
This reverts commit 11bcd318ab.
2023-02-02 14:50:41 +01:00
standardci
6e26c0a0be chore(release): publish new version
- @standardnotes/auth-server@1.87.10
2023-02-02 12:59:22 +00:00
Karol Sójko
11bcd318ab fix(auth): disallow adding u2f devices if a user does not have 2fa enabled 2023-02-02 13:57:27 +01:00
standardci
2f6d19dc91 chore(release): publish new version
- @standardnotes/auth-server@1.87.9
2023-02-02 10:33:14 +00:00
Karol Sójko
989e1ce175 fix(auth): verification rpid options 2023-02-02 11:31:31 +01:00
standardci
1c2fd46401 chore(release): publish new version
- @standardnotes/auth-server@1.87.8
2023-02-02 08:23:06 +00:00
Karol Sójko
b7967b34d1 fix(auth): allow defining multiple expected origins upon u2f registration and verification 2023-02-02 09:21:11 +01:00
standardci
44dfa37852 chore(release): publish new version
- @standardnotes/analytics@2.19.15
 - @standardnotes/api-gateway@1.46.10
 - @standardnotes/auth-server@1.87.7
 - @standardnotes/domain-events-infra@1.9.68
 - @standardnotes/event-store@1.6.68
 - @standardnotes/files-server@1.9.14
 - @standardnotes/revisions-server@1.10.27
 - @standardnotes/scheduler-server@1.16.18
 - @standardnotes/syncing-server@1.29.13
 - @standardnotes/websockets-server@1.5.19
 - @standardnotes/workspace-server@1.19.22
2023-01-30 12:07:23 +00:00
Karol Sójko
a06e3c7e74 Merge pull request #431 from standardnotes/aws-sdk-upgrade
feat: aws sdk upgrade
2023-01-30 13:05:58 +01:00
Karol Sójko
b54c331bef fix: sqs configuration for aws sdk v3 2023-01-30 12:49:14 +01:00
Karol Sójko
8216fe5e36 chore: add script to build a local version of a service 2023-01-30 09:52:57 +01:00
Karol Sójko
b5c9c4b188 chore: add running all e2e tess in parallel 2023-01-30 08:40:47 +01:00
Karol Sójko
86bd617933 chore: refactor PR workflow 2023-01-30 08:32:19 +01:00
Karol Sójko
eb771e7932 refactor: upgrade aws sdk to v3 2023-01-27 15:56:52 +01:00
standardci
5ea91aeafc chore(release): publish new version
- @standardnotes/auth-server@1.87.6
2023-01-26 13:51:01 +00:00
Karol Sójko
3c67290aeb fix(auth): add migration for fixing credential id column type 2023-01-26 14:48:25 +01:00
standardci
f9f6c2f9be chore(release): publish new version
- @standardnotes/auth-server@1.87.5
2023-01-26 13:24:24 +00:00
Karol Sójko
a92e8f61bc fix(auth): credential id column type in authenticators 2023-01-26 14:22:09 +01:00
Karol Sójko
e739683bb6 chore: fix x64 deps 2023-01-26 13:15:34 +01:00
standardci
f4a743593d chore(release): publish new version
- @standardnotes/analytics@2.19.14
 - @standardnotes/api-gateway@1.46.9
 - @standardnotes/auth-server@1.87.4
 - @standardnotes/event-store@1.6.67
 - @standardnotes/files-server@1.9.13
 - @standardnotes/revisions-server@1.10.26
 - @standardnotes/scheduler-server@1.16.17
 - @standardnotes/syncing-server@1.29.12
 - @standardnotes/websockets-server@1.5.18
 - @standardnotes/workspace-server@1.19.21
2023-01-25 14:24:09 +00:00
Karol Sójko
f93e49ecf3 chore: upgrade node to 18.13.0 2023-01-25 15:21:26 +01:00
standardci
d6325a42ea chore(release): publish new version
- @standardnotes/api-gateway@1.46.8
 - @standardnotes/auth-server@1.87.3
2023-01-25 12:25:57 +00:00
Karol Sójko
ef997be219 refactor: generating authentication options 2023-01-25 13:24:02 +01:00
standardci
b6eadfcebc chore(release): publish new version
- @standardnotes/auth-server@1.87.2
 - @standardnotes/revisions-server@1.10.25
 - @standardnotes/syncing-server@1.29.11
 - @standardnotes/websockets-server@1.5.17
 - @standardnotes/workspace-server@1.19.20
2023-01-24 13:20:28 +00:00
Karol Sójko
e4c65ca631 fix(auth): add pseudo u2f params on non existing accounts 2023-01-24 14:17:59 +01:00
standardci
2d2342f9ee chore(release): publish new version
- @standardnotes/analytics@2.19.13
 - @standardnotes/auth-server@1.87.1
 - @standardnotes/common@1.46.5
 - @standardnotes/revisions-server@1.10.24
 - @standardnotes/syncing-server@1.29.10
 - @standardnotes/websockets-server@1.5.16
 - @standardnotes/workspace-server@1.19.19
2023-01-24 12:48:21 +00:00
Karol Sójko
60838a1b7e chore: replace ErrorTag with usage from @standardnotes/api 2023-01-24 13:46:20 +01:00
standardci
63401b7640 chore(release): publish new version
- @standardnotes/auth-server@1.87.0
2023-01-24 11:14:52 +00:00
Karol Sójko
6a5b669ec4 feat(auth): add U2F to MFA verification 2023-01-24 12:12:51 +01:00
standardci
ca201447d2 chore(release): publish new version
- @standardnotes/auth-server@1.86.4
2023-01-24 10:19:45 +00:00
Karol Sójko
f1d3117518 fix(auth): add cleanup of authenticator devices upon sign in with recovery codes 2023-01-24 11:17:51 +01:00
standardci
8559948a5a chore(release): publish new version
- @standardnotes/auth-server@1.86.3
2023-01-24 08:36:36 +00:00
Karol Sójko
a3b4aa3b4a Revert "fix(auth): fido options user verification as discouraged"
This reverts commit 3d475cc779.
2023-01-24 09:34:37 +01:00
standardci
0347fa381f chore(release): publish new version
- @standardnotes/auth-server@1.86.2
2023-01-24 07:26:23 +00:00
Karol Sójko
3d475cc779 fix(auth): fido options user verification as discouraged 2023-01-24 08:24:25 +01:00
standardci
ceec74fb70 chore(release): publish new version
- @standardnotes/auth-server@1.86.1
2023-01-24 05:43:19 +00:00
Karol Sójko
f5296a947e fix(auth): buffer types on authenticator credentials 2023-01-24 06:40:54 +01:00
standardci
5b5fcd9372 chore(release): publish new version
- @standardnotes/auth-server@1.86.0
2023-01-23 14:33:52 +00:00
Karol Sójko
c38817c62e feat(auth): add configurable user verification requirement on u2f via env vars 2023-01-23 15:31:49 +01:00
standardci
ba08c6a707 chore(release): publish new version
- @standardnotes/auth-server@1.85.0
2023-01-23 12:55:06 +00:00
Karol Sójko
1797bc8181 feat(auth): add configuring u2f expect origin 2023-01-23 13:53:10 +01:00
standardci
657aaf75ec chore(release): publish new version
- @standardnotes/auth-server@1.84.11
2023-01-23 10:47:04 +00:00
Karol Sójko
dac3c733b3 chore: fix cbor-extract dependencies 2023-01-23 11:44:35 +01:00
standardci
d02b6b67b5 chore(release): publish new version
- @standardnotes/auth-server@1.84.10
2023-01-23 10:30:43 +00:00
Karol Sójko
52ce5f3a2f fix(auth): upgrade simplewebauthn types 2023-01-23 11:28:36 +01:00
Karol Sójko
1d316e17cb chore: upgrade @simplewebauthn packages 2023-01-23 11:08:07 +01:00
Karol Sójko
6193f4b87a chore: upgrade eslint-config-prettier 2023-01-23 11:08:06 +01:00
standardci
de5a30e46c chore(release): publish new version
- @standardnotes/auth-server@1.84.9
 - @standardnotes/revisions-server@1.10.23
 - @standardnotes/websockets-server@1.5.15
 - @standardnotes/workspace-server@1.19.18
2023-01-23 09:56:32 +00:00
Karol Sójko
973acd22ca chore: fix dependecies 2023-01-23 10:53:40 +01:00
standardci
e235293070 chore(release): publish new version
- @standardnotes/auth-server@1.84.8
 - @standardnotes/revisions-server@1.10.22
 - @standardnotes/websockets-server@1.5.14
 - @standardnotes/workspace-server@1.19.17
2023-01-20 17:04:09 +00:00
Karol Sójko
07ab67faa8 chore: upgrade dependencies 2023-01-20 18:01:59 +01:00
standardci
e6fce8cbc7 chore(release): publish new version
- @standardnotes/auth-server@1.84.7
 - @standardnotes/revisions-server@1.10.21
 - @standardnotes/syncing-server@1.29.9
 - @standardnotes/websockets-server@1.5.13
 - @standardnotes/workspace-server@1.19.16
2023-01-20 13:53:37 +00:00
Karol Sójko
589f8e62f4 fix: dependency issues 2023-01-20 14:51:34 +01:00
Karol Sójko
27f45f7cf6 fix(websockets): bundling issue 2023-01-20 14:43:11 +01:00
Karol Sójko
48af4ac79c chore: upgrade @standardnotes/* dependencies 2023-01-20 14:31:23 +01:00
standardci
9b6baab1e0 chore(release): publish new version
- @standardnotes/analytics@2.19.12
 - @standardnotes/api-gateway@1.46.7
 - @standardnotes/auth-server@1.84.6
 - @standardnotes/domain-events-infra@1.9.67
 - @standardnotes/domain-events@2.106.2
 - @standardnotes/event-store@1.6.66
 - @standardnotes/files-server@1.9.12
 - @standardnotes/revisions-server@1.10.20
 - @standardnotes/scheduler-server@1.16.16
 - @standardnotes/syncing-server@1.29.8
 - @standardnotes/websockets-server@1.5.12
 - @standardnotes/workspace-server@1.19.15
2023-01-20 13:30:38 +00:00
Karol Sójko
3ba4e712dc chore: remove circular dep 2023-01-20 14:27:54 +01:00
Karol Sójko
5bf3ecdf42 Revert "chore: upgrade @standardnotes/* dependencies"
This reverts commit bd6fd472a6.
2023-01-20 14:26:58 +01:00
Karol Sójko
bd6fd472a6 chore: upgrade @standardnotes/* dependencies 2023-01-20 14:08:55 +01:00
standardci
7f4776b52b chore(release): publish new version
- @standardnotes/analytics@2.19.11
 - @standardnotes/api-gateway@1.46.6
 - @standardnotes/auth-server@1.84.5
 - @standardnotes/common@1.46.4
 - @standardnotes/domain-core@1.11.2
 - @standardnotes/domain-events-infra@1.9.66
 - @standardnotes/domain-events@2.106.1
 - @standardnotes/event-store@1.6.65
 - @standardnotes/files-server@1.9.11
 - @standardnotes/predicates@1.6.5
 - @standardnotes/revisions-server@1.10.19
 - @standardnotes/scheduler-server@1.16.15
 - @standardnotes/security@1.7.6
 - @standardnotes/settings@1.19.1
 - @standardnotes/sncrypto-node@1.13.1
 - @standardnotes/syncing-server@1.29.7
 - @standardnotes/time@1.14.1
 - @standardnotes/websockets-server@1.5.11
 - @standardnotes/workspace-server@1.19.14
2023-01-20 10:59:12 +00:00
Karol Sójko
d20f03127a chore(deps): upgrade eslint tools 2023-01-20 10:16:04 +01:00
Karol Sójko
4b6c7774e0 chore: bring back e2e tests 2023-01-20 09:54:30 +01:00
standardci
d02bca8879 chore(release): publish new version
- @standardnotes/auth-server@1.84.4
2023-01-20 00:06:06 +00:00
moughxyz
5e654ccf94 temp: disable e2e tests 2023-01-19 18:03:54 -06:00
standardci
7d3e5c22fb chore(release): publish new version
- @standardnotes/auth-server@1.84.2
2023-01-19 23:29:14 +00:00
moughxyz
23eb61ee5f refactor: offlineRoles => roles 2023-01-19 17:27:20 -06:00
standardci
2cded4b2d1 chore(release): publish new version
- @standardnotes/auth-server@1.84.1
 - @standardnotes/syncing-server@1.29.6
2023-01-19 23:25:55 +00:00
moughxyz
ba7662fc1e fix: strings for role names 2023-01-19 17:23:58 -06:00
standardci
832a48ac76 chore(release): publish new version
- @standardnotes/analytics@2.19.10
 - @standardnotes/api-gateway@1.46.5
 - @standardnotes/auth-server@1.84.0
 - @standardnotes/domain-events-infra@1.9.65
 - @standardnotes/domain-events@2.106.0
 - @standardnotes/event-store@1.6.64
 - @standardnotes/files-server@1.9.10
 - @standardnotes/revisions-server@1.10.18
 - @standardnotes/scheduler-server@1.16.14
 - @standardnotes/syncing-server@1.29.5
 - @standardnotes/websockets-server@1.5.10
 - @standardnotes/workspace-server@1.19.13
2023-01-19 22:31:28 +00:00
Mo
2db0c125fe feat: offline roles (#419) 2023-01-19 16:29:36 -06:00
standardci
20d9624bc6 chore(release): publish new version
- @standardnotes/auth-server@1.83.1
2023-01-19 19:40:49 +00:00
moughxyz
f20ee68f50 Revert "feat: include roles in offline features request (#418)"
This reverts commit 2e7fdd93dd.
2023-01-19 13:38:46 -06:00
standardci
cbf45ce3eb chore(release): publish new version
- @standardnotes/auth-server@1.83.0
2023-01-19 19:18:16 +00:00
Mo
2e7fdd93dd feat: include roles in offline features request (#418) 2023-01-19 13:16:16 -06:00
standardci
8ce38f82b5 chore(release): publish new version
- @standardnotes/analytics@2.19.9
 - @standardnotes/api-gateway@1.46.4
 - @standardnotes/auth-server@1.82.6
 - @standardnotes/domain-events-infra@1.9.64
 - @standardnotes/domain-events@2.105.5
 - @standardnotes/event-store@1.6.63
 - @standardnotes/files-server@1.9.9
 - @standardnotes/revisions-server@1.10.17
 - @standardnotes/scheduler-server@1.16.13
 - @standardnotes/syncing-server@1.29.4
 - @standardnotes/websockets-server@1.5.9
 - @standardnotes/workspace-server@1.19.12
2023-01-19 16:19:54 +00:00
Aman Harwara
ec5429eeec fix: expected value for unit test (#417) 2023-01-19 21:47:32 +05:30
standardci
4b17c4045d chore(release): publish new version
- @standardnotes/analytics@2.19.8
 - @standardnotes/api-gateway@1.46.3
 - @standardnotes/auth-server@1.82.5
 - @standardnotes/common@1.46.3
 - @standardnotes/domain-events-infra@1.9.63
 - @standardnotes/domain-events@2.105.4
 - @standardnotes/event-store@1.6.62
 - @standardnotes/files-server@1.9.8
 - @standardnotes/predicates@1.6.4
 - @standardnotes/revisions-server@1.10.16
 - @standardnotes/scheduler-server@1.16.12
 - @standardnotes/security@1.7.5
 - @standardnotes/syncing-server@1.29.3
 - @standardnotes/websockets-server@1.5.8
 - @standardnotes/workspace-server@1.19.11
2023-01-19 14:13:50 +00:00
Karol Sójko
aaf42e4693 refactor: remove Uuid from @standardnotes/common in favour of @standardnotes/domain-core definition 2023-01-19 15:11:47 +01:00
standardci
0e3cbfc40b chore(release): publish new version
- @standardnotes/analytics@2.19.7
 - @standardnotes/api-gateway@1.46.2
 - @standardnotes/auth-server@1.82.4
 - @standardnotes/common@1.46.2
 - @standardnotes/domain-events-infra@1.9.62
 - @standardnotes/domain-events@2.105.3
 - @standardnotes/event-store@1.6.61
 - @standardnotes/files-server@1.9.7
 - @standardnotes/predicates@1.6.3
 - @standardnotes/revisions-server@1.10.15
 - @standardnotes/scheduler-server@1.16.11
 - @standardnotes/security@1.7.4
 - @standardnotes/syncing-server@1.29.2
 - @standardnotes/websockets-server@1.5.7
 - @standardnotes/workspace-server@1.19.10
2023-01-19 13:08:22 +00:00
Karol Sójko
a95ca05c10 refactor: remove RoleName from @standardnotes/common in favour of @standardnotes/domain-core definition 2023-01-19 14:05:48 +01:00
standardci
56b600dbdc chore(release): publish new version
- @standardnotes/analytics@2.19.6
 - @standardnotes/api-gateway@1.46.1
 - @standardnotes/auth-server@1.82.3
 - @standardnotes/domain-events-infra@1.9.61
 - @standardnotes/event-store@1.6.60
 - @standardnotes/files-server@1.9.6
 - @standardnotes/revisions-server@1.10.14
 - @standardnotes/scheduler-server@1.16.10
 - @standardnotes/syncing-server@1.29.1
 - @standardnotes/websockets-server@1.5.6
 - @standardnotes/workspace-server@1.19.9
2023-01-18 18:22:21 +00:00
Karol Sójko
80a013d0a3 fix: missing dependencies 2023-01-18 19:19:34 +01:00
Karol Sójko
7ef59bb74c chore(deps): upgrade newrelic 2023-01-18 19:19:07 +01:00
standardci
9cf1a9e25c chore(release): publish new version
- @standardnotes/auth-server@1.82.2
2023-01-18 16:51:51 +00:00
Aman Harwara
0fce6c0cd4 chore: update @standardnotes/features (#415) 2023-01-18 22:19:47 +05:30
standardci
2d444e9aa0 chore(release): publish new version
- @standardnotes/syncing-server@1.29.0
2023-01-18 08:03:57 +00:00
Karol Sójko
7c393b1125 feat(syncing-server): remove saving revisions in syncing-server database in favour of the revisions server 2023-01-18 09:01:46 +01:00
742 changed files with 8805 additions and 16906 deletions

13
.dockerignore Normal file
View File

@@ -0,0 +1,13 @@
dist
coverage
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/unplugged
!.yarn/sdks
!.yarn/versions
data/*

View File

@@ -1,6 +1,29 @@
###########
# General #
###########
EXPOSED_PORT=3000
#########
# FILES #
#########
EXPOSED_FILES_SERVER_PORT=3042
PUBLIC_FILES_SERVER_URL=http://localhost:3042
######
# DB #
######
DB_HOST=db
DB_PORT=3306
DB_USERNAME=std_notes_user
DB_PASSWORD=changeme123
DB_DATABASE=standard_notes_db
DB_DEBUG_LEVEL=all
DB_MIGRATIONS_PATH=dist/migrations/*.js
#########
# CACHE #
#########
REDIS_PORT=6379
REDIS_HOST=cache

View File

@@ -55,6 +55,11 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/revisions"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/scheduler"
schedule:
@@ -85,6 +90,11 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/websockets"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/workspace"
schedule:

101
.github/workflows/common-e2e.yml vendored Normal file
View File

@@ -0,0 +1,101 @@
name: Reusable Run E2E Test Suite Workflow
on:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
e2e:
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs
ports:
- 9001:9001
db:
image: mysql:8
env:
MYSQL_DATABASE: standard_notes_db
MYSQL_USER: std_notes_user
MYSQL_PASSWORD: changeme123
MYSQL_ROOT_PASSWORD: changeme123
ports:
- 3306:3306
cache:
image: redis:6.0-alpine
ports:
- 6379:6379
mock-event-publisher:
image: standardnotes/mock-event-publisher
ports:
- 3124:3000
env:
LOG_LEVEL: debug
NODE_ENV: production
VERSION: snjs-test
SNS_TOPIC_ARN: arn:aws:sns:us-east-1:000000000000:payments-local-topic
SNS_ENDPOINT: http://localstack:4566
SNS_DISABLE_SSL: true
SNS_SECRET_ACCESS_KEY: x
SNS_ACCESS_KEY_ID: x
SNS_AWS_REGION: us-east-1
NEW_RELIC_ENABLED: false
options: >-
--name "mock-event-publisher"
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build Docker image for E2E testing
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: standardnotes/server:${{ github.sha }}
- name: Run Server
run: docker run -d standardnotes/server:${{ github.sha }}
env:
EXPOSED_PORT: 3123
EXPOSED_FILES_SERVER_PORT: 3125
PUBLIC_FILES_SERVER_URL: http://localhost:3125
DB_HOST: localhost
DB_PORT: 3306
DB_USERNAME: std_notes_user
DB_PASSWORD: changeme123
DB_DATABASE: standard_notes_db
REDIS_PORT: 6379
REDIS_HOST: localhost
AUTH_SERVER_ACCESS_TOKEN_AGE: 4
AUTH_SERVER_REFRESH_TOKEN_AGE: 10
AUTH_SERVER_EPHEMERAL_SESSION_AGE: 300
SYNCING_SERVER_REVISIONS_FREQUENCY: 5
AUTH_SERVER_LOG_LEVEL: debug
SYNCING_SERVER_LOG_LEVEL: debug
FILES_SERVER_LOG_LEVEL: debug
REVISIONS_SERVER_LOG_LEVEL: debug
API_GATEWAY_LOG_LEVEL: debug
- name: Wait for server to start
run: docker/wait-for.sh localhost 3123
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html

View File

@@ -0,0 +1,54 @@
name: Reusable Publish Docker Self Hosting Image Workflow
on:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
e2e:
name: E2E
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
secrets: inherit
publish:
runs-on: ubuntu-latest
needs: e2e
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
standardnotes/server:latest
standardnotes/server:${{ github.sha }}

View File

@@ -6,19 +6,91 @@ on:
- main
jobs:
test:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: ESLint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
run: yarn build
lint:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
- name: Lint
run: yarn lint
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
- name: Test
run: yarn test
e2e:
needs: build
name: E2E
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
secrets: inherit

View File

@@ -45,3 +45,10 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
publish-self-hosting:
needs: release_and_publish
name: Publish Self Hosting Docker Image
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
secrets: inherit

3
.gitignore vendored
View File

@@ -20,3 +20,6 @@ packages/files/uploads/*
data/*
!data/.gitkeep
logs/*
!logs/.gitkeep

2
.nvmrc
View File

@@ -1 +1 @@
18.12.1
18.13.0

3375
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,5 +6,6 @@
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"terraform.languageServer.enable": false
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More