aa55h
aa55h
Explore posts from servers
PPrisma
Created by aa55h on 12/17/2024 in #help-and-questions
How to correctly deploy prisma into production?
So Im a bit clueless here, am I supposed to run prisma generate in my Dockerfile? Im using prisma with nextjs dockerfile and doing:
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
RUN yarn prisma generate
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
RUN yarn prisma generate
with:
app:
build:
context: .
args:
- DATABASE_URL=postgresql://${PG_USER}:${PG_PASS}@db:5432/riskrealm
container_name: RiskRealm
environment:
- DATABASE_URL=postgresql://${PG_USER}:${PG_PASS}@db:5432/riskrealm
env_file:
- .env.production
depends_on:
- db
ports:
- "3000:3000"
app:
build:
context: .
args:
- DATABASE_URL=postgresql://${PG_USER}:${PG_PASS}@db:5432/riskrealm
container_name: RiskRealm
environment:
- DATABASE_URL=postgresql://${PG_USER}:${PG_PASS}@db:5432/riskrealm
env_file:
- .env.production
depends_on:
- db
ports:
- "3000:3000"
but im getting DATABASE_URL was not found, where could be the issue? or am i doing the whole thing wrong?
5 replies
CC#
Created by aa55h on 10/20/2024 in #help
Mono.Cecil TypeReference modifies TypeDefinition
i have this code:
MemberReference member = instruction.Operand;
if (Mappings.GetType(member.DeclaringType.Name, DefaultNamespace) is TypeDefinitionEntry typeDefinition)
{
WriteIfVerbose($"Remapping reference to {member.Name}'s type {member.DeclaringType.Name} -> {typeDefinition[TargetNamespace]}");
member.DeclaringType.Name = typeDefinition.Names[TargetNamespace];
}
MemberReference member = instruction.Operand;
if (Mappings.GetType(member.DeclaringType.Name, DefaultNamespace) is TypeDefinitionEntry typeDefinition)
{
WriteIfVerbose($"Remapping reference to {member.Name}'s type {member.DeclaringType.Name} -> {typeDefinition[TargetNamespace]}");
member.DeclaringType.Name = typeDefinition.Names[TargetNamespace];
}
the problem is the second line in the if statement body, it seems like it also modifies the class the member belongs to, and not only the reference to it, any idea why?
8 replies
PPrisma
Created by aa55h on 9/20/2024 in #help-and-questions
Weird prisma error
No description
3 replies
PPrisma
Created by aa55h on 9/14/2024 in #help-and-questions
How to run prisma in nextjs middleware
No description
3 replies
PPrisma
Created by aa55h on 9/9/2024 in #help-and-questions
postgres db collation error
riginal error:
ERROR: template database "template1" has a collation version mismatch
DETAIL: The template database was created using collation version 2.39, but the operating system provides version 2.40.
HINT: Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:276
riginal error:
ERROR: template database "template1" has a collation version mismatch
DETAIL: The template database was created using collation version 2.39, but the operating system provides version 2.40.
HINT: Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:276
it basically happens for any database prisma creates, any idea why?
4 replies
PPrisma
Created by aa55h on 8/28/2024 in #help-and-questions
Prism generate fails on VPS but not locally
No description
7 replies
PPrisma
Created by aa55h on 8/22/2024 in #help-and-questions
prisma db push doesnt update the database
No description
5 replies