Starts in:
1 DAY
23 HRS
19 MIN
7 SEC
Starts in:
1 D
23 H
19 M
7 S

Activities of "buaziz"

Thanks @gterdem for your help.

the next problem is to have a dynamic environment for angular for docker-compose.

I solved this by using the below

change environment.prod to this

import { Config } from '@abp/ng.core';

const clientbaseUrl = 'ANGULAR_CLIENT_URL_BASE';
const hostbaseUrl = 'API_HOST_URL_BASE';

export const environment = {
  production: true,
  application: {
    clientbaseUrl,
    name: 'demo',
  },
  oAuthConfig: {
    issuer: hostbaseUrl,
    redirectUri: clientbaseUrl,
    clientId: 'Demo_App',
    responseType: 'code',
    scope: 'offline_access Demo',
  },
  apis: {
    default: {
      url: hostbaseUrl,
      rootNamespace: 'MYPROJECT.Demo',
    },
  },
} as Config.Environment;

add Dockerfile to angular with this

### STAGE 1: Build ###
FROM node:12.18.3-alpine AS build

WORKDIR /app

COPY package.json yarn.lock replace_env-variables.sh ./
ARG ANGULAR_CLIENT_URL_BASE
ARG API_HOST_URL_BASE
ENV ANGULAR_CLIENT_URL_BASE "$ANGULAR_CLIENT_URL_BASE"
ENV API_HOST_URL_BASE "$API_HOST_URL_BASE"


RUN yarn install
COPY . .
RUN yarn build --prod


### STAGE 2: Run ###
FROM nginx as final


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

COPY --from=build /app/dist/myproject /usr/share/nginx/html
COPY --from=build /app/replace_env-variables.sh /

CMD ["sh", "replace_env-variables.sh"]

add replace_env-variables.sh file to angular root


#!/usr/bin/env sh

find '/usr/share/nginx/html' -name '*.js' -exec sed -i -e 's,ANGULAR_CLIENT_URL_BASE,'"$ANGULAR_CLIENT_URL_BASE"',g' {} \;
find '/usr/share/nginx/html' -name '*.js' -exec sed -i -e 's,API_HOST_URL_BASE,'"$API_HOST_URL_BASE"',g' {} \;
nginx -g "daemon off;"

and now I can use these in my docker-compose file

  myproject-demo-angular:
    # restart: always
    environment:
      - ANGULAR_CLIENT_URL_BASE=http://localhost:4200
      - API_HOST_URL_BASE=https://localhost:44366

this took many hours to solve :(

Suggestions for Adding Docker to startup templates.

  • ABP Suite : add check box in create solution "Add Docker support"
  • Docs : Add article on how to add docker to Angular/MVC startup templates Teired/Non-tiered

Imagine you created a abp Angular startup template tiered or non teired and you want to run it immediatly on Docker

what Dockerfiles and docker-compose files you would need?

SOLVED. thanks

Dears,

any response.

I think I need more details on how package/publish a custom abp angular module like abp.ng.language-management

https://github.com/abpframework/abp/pull/5274

Looks promising, Thanks.

the app is a single tenant deployed on my client on-premises datacenter.

but I want to use the app in multiple clients (my customers) and each client will have different editions/features enabled of the same app.

I want to make sure that the client can not modify the editions/features as they have access to the DB on-premises

what is the best way to handle deployment of abp commercial in this scenario?

solved with v3.0.5

Showing 1 to 10 of 17 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06