Comments (2)
I was just replying to close this issue when your reply popped in.
I was using .Net Aspire to replicate the docker compose so I could spin this up in my development stack. I had the two port bindings the wrong way around (I thought 3001 was admin console for some reason). It was odd that both ports were returning the admin console at that point.
The docker compose docs could be a little clearer around this, and around the ENDPOINT/ADMIN_ENDPOINT usage more generally (i.e. if you're running it in Coolify or with a proxy in front, etc.).
Anyway, I now have it working in Aspire using the following (in case anyone else finds this post and is trying the same)
IResourceBuilder<IResourceWithConnectionString> db;
var dbPassword = builder.AddParameter("DatabasePassword", true);
var postgres = builder.AddPostgres("Database", password: dbPassword)
.WithDataVolume("AppHost-PostgreSQL-data")
.WithHealthCheck()
.WithPgAdmin();
var logtopg = postgres.AddDatabase("logtodb").ExcludeFromManifest();
var pgEndpoint = logtopg.Resource.Parent.PrimaryEndpoint;
var logto = builder.AddContainer("Logto", "svhd/logto", "latest")
.WithEntrypoint("sh")
.WithArgs("-c", "npm run cli db seed -- --swe && npm start")
.WithEnvironment("TRUST_PROXY_HEADER", "1")
.WithEnvironment(async context => {
var connectionStringExpression = ReferenceExpression.Create($"postgres://postgres:{logtopg.Resource.Parent.PasswordParameter}@{pgEndpoint.Property(EndpointProperty.Host)}:{pgEndpoint.Property(EndpointProperty.Port)}/logtodb");
var cs = await connectionStringExpression.GetValueAsync(context.CancellationToken);
context.EnvironmentVariables["DB_URL"] = new HostUrl(cs);
})
.WithEndpoint(port: 3001, targetPort: 3001, scheme: "http", name: "auth")
.WithEndpoint(port: 3002, targetPort: 3002, scheme: "http", name: "https")
.WithEnvironment("ENDPOINT", "")
.WithEnvironment("ADMIN_ENDPOINT", "")
.ExcludeFromManifest()
.WithReference(logtopg)
.WaitOn(logtopg);
I'm using David Fowlers WaitForDependenciesAspire repo as an example for the .WithHealthCheck()
and .WaitOn(logtopg)
elements.
from logto.
Hi @hades200082 , could you please provide more information about how you start your Logto instance? Since the admin console is running at localhost:3002
by default, but what I see from your snapshots is localhost:3001
.
from logto.
Related Issues (20)
- bug: Unable to seed database on neon HOT 4
- feature request: Local folder storage provider HOT 2
- feature request: Postmark email connector HOT 3
- feature request: Multi-user pool HOT 4
- bug: Aliyun SMS Connector incorrectly identifies a Hong Kong mobile phone number as a mainland Chinese mobile phone number HOT 2
- bug: logto/rn is not compatible with latest expo version HOT 2
- feature request: LOgto on .net core microservice using microUI demo HOT 1
- feature request: Allow Aliyun DirectMail connector to use different regions HOT 1
- feature request: MFA for admin UI? HOT 4
- bug: too little choice of webhook events in the console HOT 1
- bug: no pagination header in the Management API response HOT 4
- feature request: Application Dashboard with Icon-Based SSO Access for Organization Users HOT 1
- feature request: documentation for deploying on k8s HOT 1
- feature request: add provisioning capabilities for permissions and resources creation HOT 4
- feature request: support latest node HOT 1
- bug: getUserInfo not working when the access token expires and is refreshed HOT 3
- feature request: Ruby on Rails SDK? HOT 8
- feature request: How to use custom jwt My deployed logto cannot be used, I deployed with docker,Is this feature for a fee? HOT 2
- bug: Newly created user cannot be found by username via user search API HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logto.