correction docker composer avec les secrets #18
@@ -1,11 +1,10 @@
|
|||||||
#version: '3.9'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
container_name: fiscad-db
|
container_name: fiscad-db
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: ${POSTGRES_DB_FISCAD}
|
POSTGRES_DB: ${POSTGRES_DB_FISCAD}
|
||||||
POSTGRES_USER: ${POSTGRES_USER_FISCAD}
|
POSTGRES_USER: ${POSTGRES_USER_FISCAD}
|
||||||
@@ -16,21 +15,26 @@ services:
|
|||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- db-data-fiscad:/var/lib/postgresql/data
|
- db-data-fiscad:/var/lib/postgresql/data
|
||||||
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER_FISCAD}"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER_FISCAD}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: fiscad-app
|
container_name: fiscad-app
|
||||||
|
restart: on-failure
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB_FISCAD}
|
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB_FISCAD}
|
||||||
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER_FISCAD}
|
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER_FISCAD}
|
||||||
@@ -39,21 +43,32 @@ services:
|
|||||||
SERVER_PORT: 8282
|
SERVER_PORT: 8282
|
||||||
IO_GMSS_FISCAD_PROFILE: abomey
|
IO_GMSS_FISCAD_PROFILE: abomey
|
||||||
SPRING_PROFILES_ACTIVE: abomey
|
SPRING_PROFILES_ACTIVE: abomey
|
||||||
|
|
||||||
|
DEFAULT_USER_NAME_FILE: /run/secrets/defaultUserName
|
||||||
|
DEFAULT_USER_PASSWORD_FILE: /run/secrets/defaultUserPassword
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
- postgresPassword
|
||||||
|
- defaultUserName
|
||||||
|
- defaultUserPassword
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "8282:8282"
|
- "8282:8282"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- /fiscad/uploads:/app/uploads
|
- /fiscad/uploads:/app/uploads
|
||||||
- /fiscad/jasperReport:/app/jasperReport
|
- /fiscad/jasperReport:/app/jasperReport
|
||||||
- /fiscad/logs:/app/logs
|
- /fiscad/logs:/app/logs
|
||||||
restart: on-failure
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db-data-fiscad:
|
db-data-fiscad:
|
||||||
|
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
postgresPassword:
|
||||||
|
file: ./secrets/postgresPassword.txt
|
||||||
defaultUserName:
|
defaultUserName:
|
||||||
file: ./secrets/defaultUserName.txt
|
file: ./secrets/defaultUserName.txt
|
||||||
defaultUserPassword:
|
defaultUserPassword:
|
||||||
file: ./secrets/defaultUserPassword.txt
|
file: ./secrets/defaultUserPassword.txt
|
||||||
postgresPassword:
|
|
||||||
file: ./secrets/postgresPassword.txt
|
|
||||||
Reference in New Issue
Block a user