Skip to content

Commit

Permalink
Merge branch 'master' into DS-dario
Browse files Browse the repository at this point in the history
  • Loading branch information
dariodepa75 committed Nov 8, 2023
2 parents 62e3cb4 + 14d5a71 commit a7c5ee3
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 12 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3

with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: tiledesk/design-studio
tag_with_ref: true

- name: Build and push
uses: docker/build-push-action@v4
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### STAGE 1: Build ###

# We label our stage as ‘builder’
FROM node:14.21.2-alpine as builder

COPY package.json package-lock.json ./

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build

RUN npm ci && mkdir /ng-app && mv ./node_modules ./ng-app

WORKDIR /ng-app

COPY . .

## Build the angular app in production mode and store the artifacts in dist folder

RUN npm run ng build --configuration="prod" --output-path=dist --base-href="./" --output-hashing=none --build-optimizer=true --vendor-chunk


### STAGE 2: Setup ###

FROM nginx:1.14.1-alpine

## Copy our default nginx config
COPY nginx.conf /etc/nginx/nginx.conf

## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*

## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html

RUN echo "Tiledesk Design Studio Started!!"

CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/design-studio-config-template.json > /usr/share/nginx/html/design-studio-config.json && exec nginx -g 'daemon off;'"]
6 changes: 3 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumWarning": "10kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "4kb",
"maximumError": "10kb"
}
],
"fileReplacements": [
Expand Down
26 changes: 26 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

worker_processes 1;

events {
worker_connections 1024;
}

http {
server {
listen 80;
server_name localhost;

root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;

gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;

location / {
try_files $uri $uri/ /index.html;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges {
if(!this.actionIntent){
this.actionIntent = this.intentService.createNewAction(TYPE_ACTION.INTENT);
}
// set __isLast as true only for the last 'intent' action type in the list
this.actionIntent['__isLast'] = true;
this.intent.actions.push(this.actionIntent);
// this.intent.actions = this.intent.actions.map(function(action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h5 style="color:#D06079;"> {{'AnErroOccurredWhileActivatingTheBot' | translate

<div class="cds-modal-footer">

<div *ngIf="!DISPLAY_INSTALL_SCRIPT" (click)="DISPLAY_INSTALL_SCRIPT = !DISPLAY_INSTALL_SCRIPT" id="installBtn">
<div (click)="DISPLAY_INSTALL_SCRIPT = !DISPLAY_INSTALL_SCRIPT" id="installBtn">
<span> {{ "Install" | translate }} </span>
</div>

Expand All @@ -99,7 +99,8 @@ <h5 style="color:#D06079;"> {{'AnErroOccurredWhileActivatingTheBot' | translate
class="btn btn-primary cds-blue-button" (click)="hookBotToDept()">
<i *ngIf="HAS_CLICKED_HOOK_BOOT_TO_DEPT === true && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === false"
class="fa fa-spinner fa-spin"></i>
<span> {{ 'ActivateFor' | translate}} <b>{{deptSelected.name}}</b> </span>
<span> {{ 'ActivateFor' | translate}}</span>
<!-- <b>{{deptSelected.name}}</b> -->
</button>

<button *ngIf="HAS_CLICKED_HOOK_BOOT_TO_DEPT === true && HAS_COMPLETED_HOOK_BOOT_TO_DEPT === true"
Expand All @@ -119,8 +120,7 @@ <h5 style="color:#D06079;"> {{'AnErroOccurredWhileActivatingTheBot' | translate
<ng-template #publishStep>
<div class="cds-modal-body" id="publishStep">
<div *ngIf="!HAS_COMPLETED_PUBLISH" class="field-box modal-flex">
<label class="title-label"></label>
Publish your flow?
<label class="title-label">Publish your flow?</label>
<!-- <h3> {{ 'DoYouWantToActivateTheBotForNewVonversations' | translate: translateparamBotName }} </h3> -->
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class CdsModalActivateBotComponent implements OnInit {
HAS_COMPLETED_PUBLISH_ERROR: boolean = false

translateparamBotName: any
DEPTS_HAS_NOT_A_BOT: boolean = false
DEPTS_HAS_NOT_A_BOT: boolean = true


webScript: string;
Expand Down

0 comments on commit a7c5ee3

Please sign in to comment.