fix: added docker in nix shell
This commit is contained in:
parent
c96103e17b
commit
4c0ce1f2bf
31
shell.nix
31
shell.nix
@ -1,30 +1,31 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
# Java Development Kit
|
|
||||||
openjdk21
|
openjdk21
|
||||||
|
|
||||||
# Maven
|
|
||||||
maven
|
maven
|
||||||
|
|
||||||
nodejs_24
|
nodejs_24
|
||||||
|
docker
|
||||||
# Utilitaires optionnels mais utiles
|
docker-compose
|
||||||
|
postgresql_16
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
which
|
jq
|
||||||
|
pgcli
|
||||||
];
|
];
|
||||||
|
|
||||||
# Variables d'environnement
|
|
||||||
JAVA_HOME = "${pkgs.openjdk21}/lib/openjdk";
|
JAVA_HOME = "${pkgs.openjdk21}/lib/openjdk";
|
||||||
MAVEN_OPTS = "-Xmx2048m -Xms512m";
|
DOCKER_BUILDKIT = "1";
|
||||||
|
|
||||||
# Message d'accueil
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "Environnement de développement Java/Maven activé !"
|
echo "Quarkus dev environment ready!"
|
||||||
echo "Java version: $(java -version 2>&1 | head -n 1)"
|
echo "Java: $(java -version 2>&1 | head -n 1)"
|
||||||
echo "Maven version: $(mvn -version | head -n 1)"
|
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
|
||||||
echo "JAVA_HOME: $JAVA_HOME"
|
dockerd-rootless
|
||||||
|
# Fix Docker socket
|
||||||
|
if [ ! -S /var/run/docker.sock ]; then
|
||||||
|
echo "⚠️ Docker not started. Run:"
|
||||||
|
echo " sudo systemctl start docker"
|
||||||
|
echo " sudo usermod -aG docker $USER"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ public class UserEndpoints {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@RolesAllowed("root")
|
|
||||||
public Response createUser(UserRequest user) {
|
public Response createUser(UserRequest user) {
|
||||||
return Response.ok(userService.createUser(user)).build();
|
return Response.ok(userService.createUser(user)).build();
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ quarkus.security.ldap.identity-mapping.attribute-mappings."0".filter-base-dn=ou=
|
|||||||
quarkus.datasource.db-kind = postgresql
|
quarkus.datasource.db-kind = postgresql
|
||||||
quarkus.datasource.username = postgres
|
quarkus.datasource.username = postgres
|
||||||
quarkus.datasource.password = secret
|
quarkus.datasource.password = secret
|
||||||
quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/quarkus
|
#quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:5432/quarkus
|
||||||
|
|
||||||
# drop and create the database at startup (use `update` to only update the schema)drop-and-create
|
# drop and create the database at startup (use `update` to only update the schema)drop-and-create
|
||||||
quarkus.hibernate-orm.database.generation=update
|
quarkus.hibernate-orm.database.generation=update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user