I try to dockerize Abp web application. However, I found the following issues. Please Advise.
The following is the docker-compose.yml file where dnf is the system name.
services:
dnf.httpapi.host:
image: ${DOCKER_REGISTRY-}dnfhttpapihost
container_name: dnf.httpapi.host
ports:
- "44326:44326"
- "4200:4200"
- "30080:80"
- "30443:443"
build:
context: .
dockerfile: src/DNF.HttpApi.Host/Dockerfile
depends_on:
- dnf.db
restart: on-failure
dnf.db:
image: "mcr.microsoft.com/mssql/server"
container_name: dnf.db
ports:
- "34330:1433"
restart: always
environment:
MSSQL_SA_PASSWORD: "123456"
SA_PASSWORD: "123456"
ACCEPT_EULA: "Y"
dnf.authserver:
image: ${DOCKER_REGISTRY-}dnfauthserver
container_name: dnf.authserver
ports:
- "44324:44324"
build:
context: .
dockerfile: src/DNF.AuthServer/Dockerfile
depends_on:
- dnf.db
restart: on-failure
redis:
image: redis
container_name: redis
ports:
- '6379:6379'
13 Answer(s)
-
0
Hi,
It is only used for the local development environment: https://docs.abp.io/en/abp/latest/Virtual-File-System#dealing-with-embedded-files-during-development
You can try to start the container with another environment(Production etc.).
Or you can add an option to appsettings
{ "IsOnDocker": "false", }
if (hostingEnvironment.IsDevelopment() && !Convert.ToBoolean(configuration["IsOnDocker"])) { Configure<AbpVirtualFileSystemOptions>(options => { ...... }); }
services: dnf.httpapi.host: image: ${DOCKER_REGISTRY-}dnfhttpapihost container_name: dnf.httpapi.host ports: - "44326:44326" - "4200:4200" - "30080:80" - "30443:443" build: context: . dockerfile: src/DNF.HttpApi.Host/Dockerfile depends_on: - dnf.db restart: on-failure environment: IsOnDocker: "true"
-
0
Docker log show that abp need to login before start authentication server. Please advise. Thx.
-
0
Hi,
Could you share the full error log? thanks.
-
0
-
0
I try to copy access.bin to /root but the following error display. Please kindly advise.
The following is the Dockerfile of the auth server and VS2022 are run under debug mode.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 COPY ["./docker-materials/access-token.bin", "/root/.abp/cli/"]
-
0
-
0
-
0
I try to run the application without docker but the issue is same. It seems the issue no related to dockerize issue.
I found my company network is https inspection environment. It mean all the https connection will change the SSL certificate to self-signed certificate. I execute the follow command by order but the issue still exists. Please kindly advise.
-
0
-
0
I try to clean all the npm, clean yarn cache, delete node_package folder, delete yarn.lock file and re-run "abp install-libs".
However, the following abp.ng.theme.lepton-x warning are found. Is this relate? warning "@volosoft/abp.ng.theme.lepton-x > @volo/abp.ng.lepton-x.core > @volo/ngx-lepton-x.core@1.0.3" has incorrect peer dependency "@angular/core@14.2.0".
-
0
Is it possible to reproduce the problem in a new project template?
-
0
I will try to reproduce in new project later.
Current project was fixed after I clean all the node_packe, del yarn.lock file and run "abp install-libs". I will try to dockerize continuously.
-
0
OK