Skip to content

refactor(environment): unify oasys and main branch into one#123

Open
Thierry-git wants to merge 17 commits into
mainfrom
refactor/centralize-environment-variables
Open

refactor(environment): unify oasys and main branch into one#123
Thierry-git wants to merge 17 commits into
mainfrom
refactor/centralize-environment-variables

Conversation

@Thierry-git

@Thierry-git Thierry-git commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Unify oasys and main

The differences between both can be reduced to setting and environment variables. This PR realizes this. It was tested on Oasys and in a dev environment successfully, which proves that this is true and is workable in the future. Concretely...

SENSORS

  • Eliminated configure.sh, which used to swap a harcoded path for another in the cronjob directory
  • Store SERVER_URL in Sensors/.env

FRONTEND

  • Created environment.example.ts and app-settings.example.ts, which get copied when project is built for the first time as environment.ts and app-settings.ts
  • deploy.sh now checks that these files exist and also protects against misdeploying with SERVER_URL=localhost-like URLs
  • deleted install-softwares.sh, which was deprecated

BACKEND

  • Created a DEV environment variable which activates a dev environment with hot reload for the containerized version

MISCELLANEOUS

  • Got rid of CRLF default line endings in favor of LF
  • Updated all documentation where applicable

Notes

Closes #120.

Thierry-git and others added 16 commits April 10, 2026 17:46
…as environment.ts

This is a step to enable us to reuse the same codebase (main) on oasys and in development.
Stabilize crontab job paths to /opt/aquadash/sensors symlink (created by install.sh). This allows there to be a unique version of these jobs, which is a step towards not needing a separate oasys branch.
…inux-first project

CRLF default had been causing friction for many scripts and files, corrupting them upon committing
…differences between main and oasys branches

The maximal sensor history query length can be specified in seconds. This then filters the constant in constants.ts.
…ated from the defaults automatically if they don't exist

Moreover, a check is performed so as not to deploy pointed to localhost-like SERVER_URL values accidentally.
… and sent with respect to UTC in the backend
… current nginx setup

nginx expects /var/www/aquadash/browser and we were giving /var/www/aquadash

It is indeed cleaner to unpack browser, but we will not apply this fix for now
@Thierry-git Thierry-git self-assigned this Apr 14, 2026
@Thierry-git Thierry-git added refactor Medium La quantité d'effort à fournir est moyenne labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Medium La quantité d'effort à fournir est moyenne refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify main branch and oasys branch

2 participants