No description
Find a file
Claudio Maggioni fe7e004494 Merge branch 'sonar-fix' into 'dev'
Even another batch of sonar fixes

See merge request sa4-2020/the-sanmarinoes/backend!132
2020-05-10 12:51:23 +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 Fixing confirmationTokenRepository and deleted generic parameter on children of trigger 2020-05-10 12:48:41 +02:00
.gitignore Added installation instructions and tweaked Dockerfile 2020-03-25 14:57:46 +01:00
.gitlab-ci.yml Issue #73: fix CI_PROJECT_PATH_SLUG env variable name 2020-05-07 13:49:32 +02:00
.mailmap Added updated mailmap for everyone in the repo 2020-05-06 12:10:45 +02:00
build.gradle Resolve "Setup SonarQube pipeline for development branch" 2020-05-07 13:39:08 +02:00
Dockerfile Added installation instructions and tweaked Dockerfile 2020-03-25 14:57:46 +01:00
gradle.properties WIP on error fixing for sonarqube code smells and vulnerabilities check 2020-05-07 10:33:20 +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
README.md fix 2020-03-26 11:17:42 +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

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