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

  • ABP Framework version: v3.1.0

  • UI type: Angular

  • Exception message and stack trace:

the important parts of the error

  • Command: npm run compile:ivy
  • error Command "ngcc" not found.
error C:\Source\MyProject.Demo\angular\node_modules\@MyModules\myModule: Command failed.
Exit code: 1
Command: npm run compile:ivy
Arguments:
Directory: C:\Source\MyProject.Demo\angular\node_modules\@MyModules\myModule
Output:
> @MyModules/myModule@0.0.10 compile:ivy C:\Source\MyProject.Demo\angular\node_modules\@MyModules\myModule
> yarn ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules --async false

yarn run v1.22.4
error Command "ngcc" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @MyModules/myModule@0.0.10 compile:ivy: `yarn ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules --async false`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @MyModules/myModule@0.0.10 compile:ivy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\s\AppData\Roaming\npm-cache\_logs\2020-09-09T08_03_25_666Z-debug.log
  • Steps to reproduce the issue:
  • Create a new module with -t module-pro -u angular
  • build and publish to Azure Artifacts npm feed
  • create new abp angular app
  • add custom abp angular module npm package to new abp app

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

  • ABP Framework version: v3.1.0-rc4
  • UI type: Angular
I want to know the steps to dockerize the abp solution with Angular Tiered or non-tiered
  • Dockerfiles required for HttpApi, Angular and database
  • Docker-compose using Tiered and Non-Tierd architecture

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.0.5
  • UI type: Angular /
  • Identity Server Seperated (Angular):
  • Steps to reproduce the issue: Login, switch to RTL language (arabic) go to Identity > Permissions,

Tree is not aligned correctly as shown below

"Role Management" item alignement is the same as "CREATE" item below it

here is how it looks in LTR

Showing 1 to 10 of 26 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11