Skip to content

Commit

Permalink
Merge full-id-service
Browse files Browse the repository at this point in the history
  • Loading branch information
guimard committed Jul 18, 2024
1 parent 964e22d commit 034db33
Show file tree
Hide file tree
Showing 256 changed files with 30,938 additions and 16,120 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules/
packages/*/example/*.js*
*.map
.nx/
packages/matrix-identity-server/matrix-server/synapse-data
51 changes: 42 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
FROM node:18
# Base for final image
FROM debian:bookworm-slim as node-minimal

env BASE_URL= \
RUN apt update && \
apt -y dist-upgrade && \
apt -y install nodejs && \
apt autoremove -y && \
apt clean && \
rm -rf /var/lib/apt/lists/*

# Temporary image to build app
FROM debian:bookworm-slim as builder

RUN apt update && \
apt -y dist-upgrade && \
apt -y install nodejs npm && \
apt autoremove -y && \
apt clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

# COPIES
# 1. Files
COPY package*.json .njsscan *.js *.json *.mjs LICENSE ./

# 2. Directories
COPY .husky ./.husky/
COPY packages ./packages/
COPY landing /usr/src/app/landing
#COPY node_modules ./node_modules/

# Build and clean

RUN npm install && npm run build && \
rm -rf node_modules */*/node_modules && \
npm install --production --ignore-scripts && \
npm cache clean --force

FROM node-minimal as tom-server

ENV BASE_URL= \
CRON_SERVICE= \
CROWDSEC_URI= \
CROWDSEC_KEY= \
Expand Down Expand Up @@ -54,15 +93,9 @@ env BASE_URL= \
RATE_LIMITING_NB_REQUESTS= \
TRUSTED_PROXIES=

RUN apt update && apt -y dist-upgrade
COPY --from=1 /usr/src/app /usr/src/app/

WORKDIR /usr/src/app

COPY package*.json ./

COPY . .

RUN npm install && npm run build && npm cache clean --force

EXPOSE 3000
CMD [ "node", "/usr/src/app/server.mjs" ]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ REST API Endpoints documentation is available on https://linagora.github.io/ToM-

* [@twake/matrix-identity-server](./packages/matrix-identity-server):
[Matrix Identity Service](https://spec.matrix.org/v1.6/identity-service-api/) implementation for Node.js
* [@twake/matrix-client-server](./packages/matrix-client-server/):
[Matrix Client-Server](https://spec.matrix.org/v1.11/client-server-api/) implementation for Node.js
* [@twake/matrix-invite](./packages/matrix-invite): matrix invitation web application
* [@twake/server](./packages/tom-server): the main Twake Chat Server, extends [@twake/matrix-identity-server](./packages/matrix-identity-server)
* [@twake/federated-identity-service](./packages/federated-identity-service): Twake Federated Identity Service
* [@twake/config-parser](./packages/config-parser): simple file parser that uses also environment variables
* [@twake/crypto](./packages/crypto): cryptographic methods for Twake Chat
* [@twake/logger](./packages/logger): logger for Twake
* [@twake/utils](.packages/utils): utilitary methods for Twake Chat
* [@twake/matrix-application-server](./packages/matrix-application-server): implements
[Matrix Application Service API](https://spec.matrix.org/v1.6/application-service-api/)
* [matrix-resolve](./packages/matrix-resolve): resolve a Matrix "server name" into base URL following
Expand Down
Loading

0 comments on commit 034db33

Please sign in to comment.