Go to file
Claudio Maggioni 9f7319a25b Merge branch 'dev' into 'master'
Dev

See merge request sa4-2020/the-sanmarinoes/backend!99
2020-04-28 09:34:16 +02:00
docs polished er diagram for current db model 2020-02-27 15:48:53 +01:00
git-hooks First Controller 2020-02-25 14:25:03 +01:00
gradle/wrapper Adapted websocket code to new redux specification 2020-04-12 15:58:40 +02:00
src fix 2020-04-27 19:04:52 +02:00
.gitignore Added installation instructions and tweaked Dockerfile 2020-03-25 14:57:46 +01:00
.gitlab-ci.yml Added installation instructions and tweaked Dockerfile 2020-03-25 14:57:46 +01:00
Dockerfile Added installation instructions and tweaked Dockerfile 2020-03-25 14:57:46 +01:00
README.md fix 2020-03-26 11:17:42 +01:00
build.gradle Fixes to Scene implementation 2020-04-18 12:38:52 +02:00
gradle.yml Unauthenticated socket works 2020-03-14 20:32:54 +01:00
gradlew Imported Spring Boot starter project 2020-02-20 15:22:37 +01:00
gradlew.bat Imported Spring Boot starter project 2020-02-20 15:22:37 +01:00
settings.gradle Imported Spring Boot starter project 2020-02-20 15:22:37 +01:00
socket_test.html Code review for Thermostat 2020-04-15 17:55:04 +02:00

README.md

backend

Installation guide

In order to install a SmartHut.sm, you can use Docker and Docker Compose in order to create che corresponding containers.

Use the following docker-compose.yml example file. Change the values of $PASSWORD and $SECRET to respectively the chosen PostgreSQL password and the JWT secret used to run the server. $SECRET must be at least 64 chars long.

version:            '2.1'

services:
  smarthutdb:
    restart:             always
    image:               postgres:12-alpine
    container_name:      smarthutdb
    volumes:
      - ./data:/var/lib/postgresql/data
    environment:
      PGDATA:            /var/lib/postgresql/data/data
      POSTGRES_DB:       smarthut
      POSTGRES_USERNAME: postgres
      POSTGRES_PASSWORD: $PASSWORD
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 30

  smarthutbackend:
    restart:             always
    image:               smarthutsm/smarthut-backend:M1
    depends_on:
      smarthutdb:
        condition: service_healthy
    ports:
      - 8080:8080
    environment:
      - POSTGRES_JDBC=jdbc:postgresql://smarthutdb:5432/smarthut
      - POSTGRES_USER=postgres
      - POSTGRES_PASS=$PASSWORD
      - SECRET=$SECRET
      - MAIL_HOST=smtp.gmail.com
      - MAIL_PORT=587
      - MAIL_STARTTLS=true
      - MAIL_USER=smarthut.sm@gmail.com
      - MAIL_PASS=dcadvbagqfkwbfts
      - BACKEND_URL=http://localhost:8080
      - FRONTEND_URL=http://localhost

  smarthut:
    restart:             always
    image:               smarthutsm/smarthut:M1
    ports:
      - 80:80
    environment:
      - BACKEND_URL=http://localhost:8080