Activities of "buaziz"

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

Dears,

any response.

SOLVED. thanks

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?

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

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 :(

Showing 21 to 26 of 26 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 15, 2025, 06:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.