Scala depends on node

This commit is contained in:
Guntis Smaukstelis
2025-03-02 22:03:27 +02:00
parent 6237788486
commit a3048d7cb3
4 changed files with 7 additions and 9 deletions
-3
View File
@@ -7,9 +7,6 @@ RUN sbt clean assembly
FROM amazoncorretto:17-alpine FROM amazoncorretto:17-alpine
COPY --from=build /app/web/dist/ /web/dist/
COPY --from=build /app/target/scala-2.13/app.jar /app.jar COPY --from=build /app/target/scala-2.13/app.jar /app.jar
VOLUME /data
CMD ["java", "-jar", "app.jar"] CMD ["java", "-jar", "app.jar"]
+1 -2
View File
@@ -7,8 +7,7 @@ Rename `.env-sample` to `.env` and fill in credentials
## Run ## Run
``` ```
docker-compose up --build node docker-compose up --build
docker-compose up --build scala
``` ```
## Web ## Web
+4 -2
View File
@@ -1,9 +1,9 @@
services: services:
node: node:
image: node:22.14.0 image: node:22.14.0
working_dir: /app/web working_dir: /web
volumes: volumes:
- ./web:/app/web - ./web:/web
command: sh -c "npm install && npm run build" command: sh -c "npm install && npm run build"
postgres: postgres:
@@ -40,9 +40,11 @@ services:
dockerfile: Dockerfile.local dockerfile: Dockerfile.local
volumes: volumes:
- scala-data:/data - scala-data:/data
- ./web/dist:/web/dist
ports: ports:
- "9090:8080" - "9090:8080"
depends_on: depends_on:
- node
- postgres - postgres
volumes: volumes:
+2 -2
View File
@@ -10,8 +10,8 @@ import { apiHost } from './consts';
import { WeatherIconStub } from './components/weatherIcons/WeatherIconStub'; import { WeatherIconStub } from './components/weatherIcons/WeatherIconStub';
import { Harmonie } from './harmonie/Harmonie' import { Harmonie } from './harmonie/Harmonie'
console.log("env:", import.meta.env.MODE); console.log("env:", import.meta.env.MODE)
console.log("api host:", apiHost); console.log("api host:", apiHost)
const App: Component = () => { const App: Component = () => {
const pages = ['station', 'cities', 'latvia', 'database', 'harmonie'] const pages = ['station', 'cities', 'latvia', 'database', 'harmonie']