Ok that worked BUTI don´t want to have the database password hardcoded in the docker file/source control. That is not a a future solution!
I would think that the environment variable should take precedence over the appsettings.json file, correct? It seems like its getting part of the connection string at least since it tries to connect to the server (so it has read that part of the env connection string) but has problem with the password... I don´t get this..
And I don´t have any custom code at all in my DbMigrator.
So what do you recommend I do here?
Hi maliming sorry I don´t understand what you are referring to?
I am able to get the connection string into my docker image and it is able to try to connect to the server (if I put e.g. a wrong server it reports that there is no such server etc.)
And from the AbpDbConnectionOptions code and its documentation I can´t see anything that could help me there.
But there is something in the abp.io framework interfering in the connection but what and why?
The details of my issue are listed up in this StackOverflow question (please don´t make me repeat it here)
But basically get this error
Npgsql.PostgresException (0x80004005): 28P01: password authentication failed for user "***"
But if I create a clean EF core project (no abp.io) I´m able to connect to the server and apply migrations using my user/pass that doesn´t work with the abp.io migrator. This here is the code that is working from within a docker
So what do I need to do or add to make this work?
I have these two tables, Conversations and ConversationMessages with one-to-many relationship (Conversations table holds onto 1 conversation topic and ConversationMessages is the recording of many back and fourth communication)
If I only have these timestamp columns in my Conversation table I need to create some dummy column to be used for a display property. Now I created this NeededToGenerate column that I´m never going to use and I hate it.
Is this a shortcoming of Suite or should I do this in some other manner?
I have few ideas for Suite functionality
Make it possible to
I think that Suite has lot of possibilities to be a even grater tool than its now!
I´m just reporting an issue that I have (see step 3) worked around and expect to get refunded.
Issue The Docker-compose.yml file is not created correctly and doesn´t work out of the box for a solution created with Suite like this
If you create a new solution with suite as above image you will
1 get this error in the docker-compose.yml file.
Incorrect type. Expected "array | docker-compose.yml" in docker-compose.yml
The depends_on: is missing - postgres
2 I picked Postgres but the docker-compose.yml contains sql-server but should be "postgres"
3 This is what I ended up creating. I´m no docker expert and got the help from my GPT friend. It would be great if this would just work out of the box!
version: '3.8'
services:
searchportal-blazor:
image: lf/searchportal-blazor:latest
container_name: searchportal-blazor
build:
context: ../../
dockerfile: src/LF.SearchPortal.Blazor/Dockerfile.local
environment:
- ASPNETCORE_URLS=https://+:443;http://+:80;
- Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx
- Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc
- App__SelfUrl=https://localhost:44314
- AuthServer__RequireHttpsMetadata=false
- AuthServer__Authority=http://searchportal-blazor
- ConnectionStrings__Default=Host=postgres;Database=SearchPortal;Username=postgres;Password=myPassw0rd;
ports:
- "44314:443"
restart: on-failure
volumes:
- ./certs:/root/certificate
networks:
- abp-network
depends_on:
- postgres
db-migrator:
image: lf/searchportal-db-migrator:latest
container_name: db-migrator
build:
context: ../../
dockerfile: src/SearchPortal.DbMigrator/Dockerfile.local
environment:
- OpenIddict__Applications__SearchPortal_BlazorServerTiered__RootUrl=https://localhost:44314
- ConnectionStrings__Default=Host=postgres;Database=SearchPortal;Username=postgres;Password=myPassw0rd;
depends_on:
postgres:
condition: service_healthy
networks:
- abp-network
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "myPassw0rd"
POSTGRES_DB: "SearchPortal"
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- abp-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 10s
retries: 5
# Added a UI to be able to view the database
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: "pgadmin4@pgadmin.org"
PGADMIN_DEFAULT_PASSWORD: "admin"
ports:
- "5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
networks:
- abp-network
depends_on:
- postgres
healthcheck:
test: ["CMD-SHELL", "wget","-O","-","http://localhost:80/misc/ping"]
interval: 10s
timeout: 10s
retries: 5
volumes:
pgdata:
name: searchportal_pgdata
pgadmin-data:
name: pgadmin-data
networks:
abp-network:
name: searchportal-network
driver: bridge
ABP Framework version: v7.2.2
UI type: Blazor Server
DB provider: EF Core / Postgress
Tiered (MVC) or Identity Server Separated (Angular): no
Exception message and stack trace: Severity Code Description Project File Line Suppression State Error (active) 0 Incorrect type. Expected "array | docker-compose.yml C:...aspnet-core\etc\docker\docker-compose.yml 20
Steps to reproduce the issue:"
I would also allow users to comment on the documentation at the bottom! Just like you are able to do in the Microsoft docs. This will help users add more information that helps others faster and you to update the docs.
How about fixing the search?
Try e.g. searching for Tiered and it will not return the Tired information I needed from the Suite creation window. I had to manually search and find it here.
I would add a ChatGPT/OpenAPI search option to the search so we can get better assistance! I would probably also let OpenAI loose on your support/github questions and ask it to create missing information documents for you. This would be money and time well spent.
btw there are lots of other examples of the search coming up short. I was searching for information on appsettings.secrets.json and can´t find any. I could get some info when searching the github issues and found this here so I know its ok to check it into git...