Adding of database initialization.

This commit is contained in:
2021-07-31 18:33:17 +02:00
parent c281df00c7
commit 935d8fc790
5 changed files with 21 additions and 4 deletions

13
docker-compose.yml Normal file
View File

@@ -0,0 +1,13 @@
version: '3.6'
services:
database:
build: "./docker/database"
container_name: "cerberus-database"
volumes:
- ./docker/database/var/lib/postgresql/data:/var/lib/postgresql/data
environment:
- "POSTGRES_DB=db_cerberus"
- "POSTGRES_USER=cerberus"
- "POSTGRES_PASSWORD=P@ssword1"
ports:
- "5432:5432"

View File

@@ -0,0 +1,3 @@
FROM postgres:13
RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV LANG fr_FR.utf8

View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

View File

@@ -5,9 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class CerberusApplication { public class CerberusApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(CerberusApplication.class, args); SpringApplication.run(CerberusApplication.class, args);
} }
} }

View File

@@ -10,8 +10,8 @@ spring:
# ------------------------------------------------- # -------------------------------------------------
datasource: datasource:
driverClassName: org.postgresql.Driver driverClassName: org.postgresql.Driver
url: jdbc:postgresql://localhost:50001/cerberus url: jdbc:postgresql://localhost:5432/db_cerberus
username: h23 username: cerberus
password: P@ssword1 password: P@ssword1
# Disable feature detection by this undocumented parameter. # Disable feature detection by this undocumented parameter.
# Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details. # Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.