Closed lelvisl closed 4 years ago
There is currently no "official" way to install apps airgapped but here are 2 workarounds:
To get every App in the Marketplace install-ready:
Note that "Install from file" was a little bit buggy for me and I needed to use "Install from URL". I just put the zip on my local webserver.
Alternatively to only install this project:
If i run rc in kubernetes cluser - i need recreate docker image, with steps from above? And will it work correctly with 2 or more replicas of rc?
Can't tell you that sorry, I don't have any experience with clustered rc. I can only say that installing it the way above is basically the same like installing it from the marketplace. So if it works from the market it should work exactly the same as instaling it manually.
Step 6/9 : RUN cd /tmp/Rocket.Chat.App-WebEx &&rc-apps deploy
---> Running in 6a28a6cf69ef
packaging your app... !
› Error: /tmp/Rocket.Chat.App-WebEx/WebExApp.ts (3,8):
› Cannot find module '@rocket.chat/apps-engine/definition/accessors' or
› its corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/WebExApp.ts (4,21):
› Cannot find module '@rocket.chat/apps-engine/definition/App' or its
› corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/WebExApp.ts (5,26):
› Cannot find module '@rocket.chat/apps-engine/definition/metadata' or
› its corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/WebExApp.ts (6,29):
› Cannot find module '@rocket.chat/apps-engine/definition/settings' or
› its corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/commands/WebExCommand.ts (1,39):
› Cannot find module '@rocket.chat/apps-engine/definition/accessors' or
› its corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/commands/WebExCommand.ts (2,36):
› Cannot find module '@rocket.chat/apps-engine/definition/messages' or
› its corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/commands/WebExCommand.ts (3,35):
› Cannot find module
› '@rocket.chat/apps-engine/definition/messages/MessageActionType' or its
› corresponding type declarations.
› Error: /tmp/Rocket.Chat.App-WebEx/commands/WebExCommand.ts (4,52):
› Cannot find module '@rocket.chat/apps-engine/definition/slashcommands'
› or its corresponding type declarations.
› Error: TypeScript compiler error(s) occurred
The command '/bin/sh -c cd /tmp/Rocket.Chat.App-WebEx &&rc-apps deploy' returned a non-zero code: 2
dockerfile:
FROM docker.io/rocketchat/rocket.chat:3.3.3
USER root
RUN apt-get update
RUN apt install git wget -y
RUN cd /tmp && git clone https://github.com/wreiske/Rocket.Chat.App-WebEx &&\
cd Rocket.Chat.App-WebEx &&\
git checkout 0.0.4 &&\
npm install &&\
npm install -g @rocket.chat/apps-cli
RUN cd /tmp/Rocket.Chat.App-WebEx &&\
rc-apps deploy
USER rocketchat
WORKDIR /app/bundle
I just did it manually on my machine and it worked fine :
Must be something else. Did you try doing "npm install -g @rocket.chat/apps-cli" earlier? Obviously it seems like the rocketchat modules aren't there the problem must be something with npm. Maybe it has something to do with running it as root ?
@lelvisl Hm i just ran this in my terminal as root and it worked
cd /tmp &&\
git clone https://github.com/wreiske/Rocket.Chat.App-WebEx &&\
cd Rocket.Chat.App-WebEx &&\
git checkout 0.0.4 &&\
npm install &&\
npm install -g @rocket.chat/apps-cli &&\
rc-apps deploy
Then i tried this Dockerfile and got the same error as you:
FROM docker.io/rocketchat/rocket.chat:3.3.3
USER root
RUN apt-get update
RUN apt install git wget -y
RUN cd /tmp &&\
git clone https://github.com/wreiske/Rocket.Chat.App-WebEx &&\
cd Rocket.Chat.App-WebEx &&\
git checkout 0.0.4 &&\
npm install &&\
npm install -g @rocket.chat/apps-cli &&\
rc-apps deploy
USER rocketchat
WORKDIR /app/bundle
But this means to me that there must be something wrong with the way docker and npm work together?
I don't think it is docker problem, but may be it is container setup problem. Without docker - what version you use? (rc/npm/os) docker.io/rocketchat/rocket.chat:3.3.3 - https://github.com/RocketChat/Docker.Official.Image/blob/master/3/Dockerfile
os: debian:jessie-slim ENV NODE_VERSION 12.16.1 rc version: 3.3.3
I think the RocketChat Image is the wrong place for this anyway since the instance already needs to be up and running when installing the extension.
I built a little Dockerfile, free from the RC Image:
# Alpine Base Image with GIT
FROM alpine/git:latest
WORKDIR /usr/app
# Install NPM
USER root
RUN apk add --update nodejs npm
# Install RocketChat CLI
RUN npm install -g @rocket.chat/apps-cli
# Clone && install WebEx App Repository
RUN git clone https://github.com/wreiske/Rocket.Chat.App-WebEx .
RUN npm install
# Deploy to RocketChat Instance
RUN rc-apps deploy --url http://localhost:3000 --username user_username --password user_password
With this it works. This obviously needs to run after the rocketchat instance is up and running.
I thought the plugin is installed near the instance. If not, you right. Thanks!
How to install this app without marketplace (my installation of rocket.chat doesn't have any internet connection)?