Adding of database initialization.
This commit is contained in:
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal 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"
|
||||
3
docker/database/Dockerfile
Normal file
3
docker/database/Dockerfile
Normal 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
|
||||
3
docker/database/scripts/00-init_env.sh
Normal file
3
docker/database/scripts/00-init_env.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
@@ -5,9 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class CerberusApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CerberusApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ spring:
|
||||
# -------------------------------------------------
|
||||
datasource:
|
||||
driverClassName: org.postgresql.Driver
|
||||
url: jdbc:postgresql://localhost:50001/cerberus
|
||||
username: h23
|
||||
url: jdbc:postgresql://localhost:5432/db_cerberus
|
||||
username: cerberus
|
||||
password: P@ssword1
|
||||
# Disable feature detection by this undocumented parameter.
|
||||
# Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.
|
||||
|
||||
Reference in New Issue
Block a user