App for sharing expenses to keep up with the current balance between people.
A) Run application with a database using Docker Compose:
- Copy
Backend/AppConfig.fs__prodtoBackend/AppConfig.fs - (optional) Copy
Frontend/src/elm/I18n/I18n.elm.templatetoFrontend/src/elm/I18n/I18n.elm. Edit "import" in copied file to choose localization. Default is EUR. - (optional) you may want to change ports in
docker-compose.yml docker-compose builddocker-compose up -d- http://127.0.0.1:5000 should be available then.
OR
B) Run only the application (no Docker containers):
- Copy
AppConfig.fs__prodtoAppConfig.fs(for security, changeAuth.tokenEncryptionKeyandAuth.passwordSalt) - (optional) Copy
Frontend/src/elm/I18n/I18n.elm.templatetoFrontend/src/elm/I18n/I18n.elm. Edit "import" in copied file to choose localization. Default is EUR. - Set
DB.host = 'host.docker.internal'insideAppConfig.fs docker build -t fundshare-appdocker run -it -p 127.0.0.1:8080:5000 fundshare-app- http://127.0.0.1:8080 should be available then.
To run .sql file on database docker:
cat dump.sql | docker exec -i fundshare_db_1 psql -U postgres -d fundshare_prod
docker exec -t -u postgres fundshare_db_1 pg_dump fundshare_prod -c > /fundshare_backup_dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
- nodejs, npm
- dotnet-script
npm i -g npx
npm i -g @dillonkearns/elm-graphql
dotnet tool install -g dotnet-script
Now you can pick some options:
buildfrontendwatchfor changes to rebuild- rebuild frontend
api, i.e. generate Elm code for GraphQL API based ongraphql_schema.json(which is generated by backend on start if specific flag is configured inAppConfig.fs) debugto provide Elm's messaging debugger
Usually it goes: dotnet script build.csx -- build debug watch.
When GraphQL API is changed in the backend code then run dotnet script build.csx -- api build.
Ensure the .NET Core 2.1 SDK is installed.
-
To build and publish an executable:
cd Backend && dotnet publish -
While developing, you can simply open
Backend.slnwith Visual Studio 2017 and run in debug mode.
