dev #6
@@ -24,6 +24,8 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
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'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
spring.application.name=backend
|
spring.application.name=backend
|
||||||
server.port=8000
|
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
|
# Slicer Configuration
|
||||||
# Map SLICER_PATH env var if present (default to /opt/orcaslicer/AppRun or Mac path)
|
# 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}
|
slicer.path=${SLICER_PATH:/Applications/OrcaSlicer.app/Contents/MacOS/OrcaSlicer}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ services:
|
|||||||
- MARKUP_PERCENT=${MARKUP_PERCENT}
|
- MARKUP_PERCENT=${MARKUP_PERCENT}
|
||||||
- TEMP_DIR=/app/temp
|
- TEMP_DIR=/app/temp
|
||||||
- PROFILES_DIR=/app/profiles
|
- PROFILES_DIR=/app/profiles
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- backend_profiles_${ENV}:/app/profiles
|
- backend_profiles_${ENV}:/app/profiles
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ services:
|
|||||||
- "${FRONTEND_PORT}:8008"
|
- "${FRONTEND_PORT}:8008"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
backend_profiles_prod:
|
backend_profiles_prod:
|
||||||
|
|||||||
@@ -25,4 +25,21 @@ services:
|
|||||||
- "80:80"
|
- "80:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
- db
|
||||||
restart: unless-stopped
|
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user