docker compose sample
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m1s
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m1s
This commit is contained in:
@@ -1,30 +1,41 @@
|
||||
version: "3"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: tea.zendric.de/cedric/xpensely-server:latest
|
||||
container_name: XpenselyServer
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "3636:8080"
|
||||
environment:
|
||||
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
||||
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
||||
DB_PORT: 5432
|
||||
DB_PORT: 5434
|
||||
DB_CONTAINER: ${DB_P_CONTAINER}
|
||||
DB_NAME: ${DB_P_NAME}
|
||||
DB_USERNAME: ${DB_USERNAME}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
depends_on:
|
||||
- postgresdb
|
||||
networks:
|
||||
- xpensely-network
|
||||
|
||||
postgresdb:
|
||||
image: postgres:14
|
||||
container_name: postgresdb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "5434:5432"
|
||||
environment:
|
||||
POSTGRES_DB: ${DB_P_NAME}
|
||||
POSTGRES_USER: ${DB_USERNAME}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
networks:
|
||||
- xpensely-network
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
networks:
|
||||
xpensely-network:
|
||||
|
||||
@@ -18,6 +18,7 @@ public class XpenselyServerApplication {
|
||||
System.setProperty("DB_PASSWORD", dotenv.get("DB_PASSWORD"));
|
||||
System.setProperty("DB_DEV_CONTAINER", dotenv.get("DB_DEV_CONTAINER"));
|
||||
System.setProperty("DB_DEV_NAME", dotenv.get("DB_DEV_NAME"));
|
||||
System.setProperty("DB_PORT", dotenv.get("DB_PORT"));
|
||||
SpringApplication.run(XpenselyServerApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_
|
||||
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://accounts.google.com
|
||||
|
||||
# PostgreSQL Configuration
|
||||
spring.datasource.url=jdbc:postgresql://${DB_DEV_CONTAINER}:5432/${DB_DEV_NAME}
|
||||
spring.datasource.url=jdbc:postgresql://${DB_DEV_CONTAINER}:${DB_PORT}/${DB_DEV_NAME}
|
||||
spring.datasource.username=${DB_USERNAME}
|
||||
spring.datasource.password=${DB_PASSWORD}
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
|
||||
Reference in New Issue
Block a user