From 5d5a20e95aabf274fdda21a2818b7a0cd6923b03 Mon Sep 17 00:00:00 2001 From: Guntis Smaukstelis Date: Thu, 28 Dec 2023 00:13:26 +0200 Subject: [PATCH] Replace pwd with relative path, update README --- README.md | 23 ++++++++++++++++++++--- docker-compose.yml | 4 ++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8adfa8..cabb7ad 100644 --- a/README.md +++ b/README.md @@ -7,17 +7,34 @@ Rename `.env-sample` to `.env` and fill in credentials ## Run ``` -docker-compose up node -docker-compose up scala +docker-compose up node --build +docker-compose up scala --build ``` ## Web [http://0.0.0.0:9080/](http://0.0.0.0:9080/) +## nginx proxy config +``` +server { + listen 80; + server_name laikazinas.lsm.lv; + + location / { + proxy_pass http://localhost:9080; # Forward requests to the Scala app + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} +``` + ## Local development ``` // 1st terminal -sbt +sbt run // 2nd terminal cd web/ diff --git a/docker-compose.yml b/docker-compose.yml index c41e71f..6d6638f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: image: node:16.13.1 working_dir: /app/web volumes: - - $PWD/web:/app/web + - ./web:/app/web command: sh -c "npm install && npm run build" postgres: @@ -34,7 +34,7 @@ services: context: . dockerfile: Dockerfile.local volumes: - - $PWD:/app + - ./:/app ports: - "9080:8080" depends_on: