SQL Server
Quepasa can use Microsoft SQL Server for storing its data. Below is an example Docker Compose snippet that includes a SQL Server container. As always, replace placeholder credentials with your own secure values.
services:
web:
image: codefroglabs/quepasa-web
environment:
QUEPASA__DATABASE__ENABLED: "true"
QUEPASA__DATABASE__CONNECTIONSTRING: "Server=db,1433;Database=Quepasa;User Id=sa;Password=YOUR-DB-PASSWORD;TrustServerCertificate=True;"
QUEPASA__DATABASE__ADOINVARIANT: "Microsoft.Data.SqlClient"
QUEPASA__DEPLOYMENT__CLUSTERMODE: "2"
QUEPASA__CLIENT__PRIMARYBACKEND: "http://backend"
ports:
- "5007:8080"
depends_on:
- backend
- db
backend:
image: codefroglabs/quepasa-backend
environment:
QUEPASA__DATABASE__ENABLED: "true"
QUEPASA__DATABASE__CONNECTIONSTRING: "Server=db,1433;Database=Quepasa;User Id=sa;Password=YOUR-DB-PASSWORD;TrustServerCertificate=True;"
QUEPASA__DATABASE__ADOINVARIANT: "Microsoft.Data.SqlClient"
QUEPASA__DEPLOYMENT__CLUSTERMODE: "2"
QUEPASA__SETUP__SEED: "true"
depends_on:
- db
db:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "YOUR-DB-PASSWORD"
ports:
- "1433:1433"
Important Considerations
Enable the Database
- Make sure
QUEPASA__DATABASE__ENABLED
is set totrue
.
- Make sure
Connection String
- For SQL Server containers, a typical connection string might look like:
Server=db,1433;Database=Quepasa;User Id=sa;Password=YOUR-DB-PASSWORD;TrustServerCertificate=True;
- Note the
db,1433
portion, which indicates the container name (db
) and the port (1433). TrustServerCertificate=True
is often used in development setups to simplify SSL certificate handling.
- For SQL Server containers, a typical connection string might look like:
Environment Variables
QUEPASA__DATABASE__ADOINVARIANT=Microsoft.Data.SqlClient
ensures that Quepasa uses the Microsoft SQL provider.SA_PASSWORD
is the SQL Server admin password, which should be a secure value.
Production vs. Development
- For production, consider securing your passwords via a secret manager, and adjusting your SQL Server configuration accordingly.
License Requirement
- As with any database-backed setup, Quepasa will look for a valid license key if
QUEPASA__DATABASE__ENABLED=true
. SetQUEPASA_LICENSE
as needed.
- As with any database-backed setup, Quepasa will look for a valid license key if
With these settings, you’ll be able to run Quepasa with SQL Server as its database. Remember to replace all example passwords with secure, unique credentials.