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__prod
toBackend/AppConfig.fs
- (optional) Copy
Frontend/src/elm/I18n/I18n.elm.template
toFrontend/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 build
docker-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__prod
toAppConfig.fs
(for security, changeAuth.tokenEncryptionKey
andAuth.passwordSalt
) - (optional) Copy
Frontend/src/elm/I18n/I18n.elm.template
toFrontend/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-app
docker 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:
build
frontendwatch
for 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
) debug
to 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.sln
with Visual Studio 2017 and run in debug mode.