dev #6

Merged
JoeKung merged 3 commits from dev into int 2026-02-10 19:05:41 +01:00
4 changed files with 29 additions and 2 deletions
Showing only changes of commit 3b4ef37e58 - Show all commits

View File

@@ -24,6 +24,8 @@ repositories {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'org.postgresql:postgresql'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

View File

@@ -1,6 +1,14 @@
spring.application.name=backend
server.port=8000
# Database Configuration
spring.datasource.url=${DB_URL:jdbc:postgresql://localhost:5432/printcalc}
spring.datasource.username=${DB_USERNAME:printcalc}
spring.datasource.password=${DB_PASSWORD:printcalc_secret}
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
# Slicer Configuration
# Map SLICER_PATH env var if present (default to /opt/orcaslicer/AppRun or Mac path)
slicer.path=${SLICER_PATH:/Applications/OrcaSlicer.app/Contents/MacOS/OrcaSlicer}

View File

@@ -15,7 +15,7 @@ services:
- MARKUP_PERCENT=${MARKUP_PERCENT}
- TEMP_DIR=/app/temp
- PROFILES_DIR=/app/profiles
restart: unless-stopped
restart: always
volumes:
- backend_profiles_${ENV}:/app/profiles
@@ -26,7 +26,7 @@ services:
- "${FRONTEND_PORT}:8008"
depends_on:
- backend
restart: unless-stopped
restart: always
volumes:
backend_profiles_prod:

View File

@@ -25,4 +25,21 @@ services:
- "80:80"
depends_on:
- backend
- db
restart: unless-stopped
db:
image: postgres:15-alpine
container_name: print-calculator-db
environment:
- POSTGRES_USER=printcalc
- POSTGRES_PASSWORD=printcalc_secret
- POSTGRES_DB=printcalc
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
postgres_data: