Merge branch 'develop' into fix/set-user

This commit is contained in:
Pranav Raj S 2022-06-17 14:04:33 +05:30
commit 2cea65fba5
7 changed files with 62 additions and 24 deletions

View file

@ -5,4 +5,4 @@ FROM ghcr.io/chatwoot/chatwoot_codespace:latest
# Do the set up required for chatwoot app # Do the set up required for chatwoot app
WORKDIR /workspace WORKDIR /workspace
COPY . /workspace COPY . /workspace
RUN yarn && gem install bundler && bundle install RUN yarn && gem install bundler && bundle install

View file

@ -1,6 +1,6 @@
# pre-build stage
ARG VARIANT=3 ARG VARIANT=ubuntu-20.04
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT} FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}
# Update args in docker-compose.yaml to set the UID/GID of the "vscode" user. # Update args in docker-compose.yaml to set the UID/GID of the "vscode" user.
ARG USER_UID=1000 ARG USER_UID=1000
@ -11,23 +11,36 @@ RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
&& chmod -R $USER_UID:$USER_GID /home/vscode; \ && chmod -R $USER_UID:$USER_GID /home/vscode; \
fi fi
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \ && apt-get -y install --no-install-recommends \
build-essential \
libssl-dev \ libssl-dev \
zlib1g-dev \
gnupg2 \
tar \ tar \
tzdata \ tzdata \
postgresql-client \ postgresql-client \
libpq-dev \
yarn \ yarn \
git \ git \
imagemagick \ imagemagick \
tmux \ tmux \
zsh zsh \
git-flow \
npm
# Install rbenv and ruby
ARG RUBY_VERSION="3.0.4"
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc
ENV PATH "/root/.rbenv/bin/:/root/.rbenv/shims/:$PATH"
RUN git clone https://github.com/rbenv/ruby-build.git && \
PREFIX=/usr/local ./ruby-build/install.sh
RUN rbenv install $RUBY_VERSION && \
rbenv global $RUBY_VERSION && \
rbenv versions
# Install overmind # Install overmind
RUN curl -L https://github.com/DarthSim/overmind/releases/download/v2.1.0/overmind-v2.1.0-linux-amd64.gz > overmind.gz \ RUN curl -L https://github.com/DarthSim/overmind/releases/download/v2.1.0/overmind-v2.1.0-linux-amd64.gz > overmind.gz \
@ -35,11 +48,25 @@ RUN curl -L https://github.com/DarthSim/overmind/releases/download/v2.1.0/overmi
&& sudo mv overmind /usr/local/bin \ && sudo mv overmind /usr/local/bin \
&& chmod +x /usr/local/bin/overmind && chmod +x /usr/local/bin/overmind
# Install gh
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh
# Do the set up required for chatwoot app # Do the set up required for chatwoot app
WORKDIR /workspace WORKDIR /workspace
COPY . /workspace COPY . /workspace
RUN yarn
# set up ruby
COPY Gemfile Gemfile.lock ./ COPY Gemfile Gemfile.lock ./
RUN gem install bundler && bundle install RUN gem install bundler && bundle install
# set up node js
RUN npm install npm@latest -g && \
npm install n -g && \
n latest
RUN npm install --global yarn
RUN yarn

View file

@ -23,17 +23,18 @@
// 5432 postgres // 5432 postgres
// 6379 redis // 6379 redis
// 1025,8025 mailhog // 1025,8025 mailhog
"forwardPorts": [8025], "forwardPorts": [8025, 3000, 3035],
//your application may need to listen on all interfaces (0.0.0.0) not just localhost for it to be available externally. Defaults to []
"appPort": [3000, 3035],
"postCreateCommand": ".devcontainer/scripts/setup.sh && bundle exec rake db:chatwoot_prepare && yarn", "postCreateCommand": ".devcontainer/scripts/setup.sh && bundle exec rake db:chatwoot_prepare && yarn",
"portsAttributes": { "portsAttributes": {
"3000": { "3000": {
"label": "Rails Server" "label": "Rails Server"
}, },
"3035": {
"label": "Webpack Dev Server"
},
"8025": { "8025": {
"label": "Mailhog UI" "label": "Mailhog UI"
} }
}, }
} }

View file

@ -6,3 +6,8 @@ sed -i -e "/FRONTEND_URL/ s/=.*/=https:\/\/$CODESPACE_NAME-3000.githubpreview.de
sed -i -e "/WEBPACKER_DEV_SERVER_PUBLIC/ s/=.*/=https:\/\/$CODESPACE_NAME-3035.githubpreview.dev/" .env sed -i -e "/WEBPACKER_DEV_SERVER_PUBLIC/ s/=.*/=https:\/\/$CODESPACE_NAME-3035.githubpreview.dev/" .env
# uncomment the webpacker env variable # uncomment the webpacker env variable
sed -i -e '/WEBPACKER_DEV_SERVER_PUBLIC/s/^# //' .env sed -i -e '/WEBPACKER_DEV_SERVER_PUBLIC/s/^# //' .env
# fix the error with webpacker
echo 'export NODE_OPTIONS=--openssl-legacy-provider' >> ~/.bashrc
# codespaces make the ports public
gh codespace ports visibility 3000:public 3035:public 8025:public -c $CODESPACE_NAME

View file

@ -22,7 +22,10 @@
/> />
</div> </div>
<div class="container"> <div class="container">
<div v-if="uiFlags.isUpdating" class="agent__list-loading"> <div
v-if="assignableAgentsUiFlags.isFetching"
class="agent__list-loading"
>
<spinner /> <spinner />
<p>{{ $t('BULK_ACTION.AGENT_LIST_LOADING') }}</p> <p>{{ $t('BULK_ACTION.AGENT_LIST_LOADING') }}</p>
</div> </div>
@ -171,7 +174,7 @@ export default {
transform-origin: top right; transform-origin: top right;
width: auto; width: auto;
z-index: var(--z-index-twenty); z-index: var(--z-index-twenty);
min-width: var(--space-giga);
.header { .header {
padding: var(--space-one); padding: var(--space-one);
@ -182,7 +185,7 @@ export default {
} }
.container { .container {
max-height: 24rem; max-height: var(--space-giga);
overflow-y: auto; overflow-y: auto;
.agent__list-container { .agent__list-container {
height: 100%; height: 100%;
@ -264,5 +267,6 @@ ul {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
padding: var(--space-two);
} }
</style> </style>

View file

@ -110,7 +110,7 @@ export default {
.labels-list { .labels-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-height: 24rem; max-height: var(--space-giga);
min-height: auto; min-height: auto;
.labels-list__header { .labels-list__header {
@ -157,8 +157,8 @@ export default {
border-radius: var(--border-radius-large); border-radius: var(--border-radius-large);
border: 1px solid var(--s-50); border: 1px solid var(--s-50);
box-shadow: var(--shadow-dropdown-pane); box-shadow: var(--shadow-dropdown-pane);
max-width: 24rem; max-width: var(--space-giga);
min-width: 24rem; min-width: var(--space-giga);
position: absolute; position: absolute;
right: 4.5rem; right: 4.5rem;
top: var(--space-larger); top: var(--space-larger);
@ -176,7 +176,7 @@ export default {
} }
.container { .container {
max-height: 24rem; max-height: var(--space-giga);
overflow-y: auto; overflow-y: auto;
.label__list-container { .label__list-container {
@ -204,7 +204,7 @@ export default {
.triangle { .triangle {
display: block; display: block;
position: absolute; position: absolute;
right: 2rem; right: var(--space-two);
text-align: left; text-align: left;
top: calc(var(--space-slab) * -1); top: calc(var(--space-slab) * -1);
z-index: var(--z-index-one); z-index: var(--z-index-one);

View file

@ -15,7 +15,8 @@
--space-larger: 4.8rem; --space-larger: 4.8rem;
--space-jumbo: 6.4rem; --space-jumbo: 6.4rem;
--space-mega: 10rem; --space-mega: 10rem;
--space-giga: 24rem;
--space-minus-micro: -0.2rem; --space-minus-micro: -0.2rem;
--space-minus-smaller: -0.4rem; --space-minus-smaller: -0.4rem;
--space-minus-small: -0.8rem; --space-minus-small: -0.8rem;