10000 GitHub - decembrya/votemonitor
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

decembrya/votemonitor

 
 

Repository files navigation

votemonitor

Technologies & Libraries

Getting started using docker

  1. Rename .env.example to .env
  2. Build project
    docker compose build
    
  3. Start project
    docker compose up -d 
    
  4. Seed platform admin
INSERT INTO public."Users"("Id", "Name", "Login", "Password", "Role", "Status", "CreatedBy", "CreatedOn",  "LastModifiedBy", "LastModifiedOn") VALUES ('771b0bb0-3f87-47a0-bc64-0878e2070374', 'PlatformAdmin', '<your-username>', '<your-password>', 'PlatformAdmin', 'Active', '00000000-0000-0000-0000-000000000000', '2024-01-23 00:00:00+00', '00000000-0000-0000-0000-000000000000', NULL);

INSERT INTO public."PlatformAdmins" VALUES ('771b0bb0-3f87-47a0-bc64-0878e2070374');

INSERT INTO public."UserPreferences"("ApplicationUserId", "LanguageId") VALUES ('771b0bb0-3f87-47a0-bc64-0878e2070374','094b3769-68b1-6211-ba2d-6bba92d6a167');
  1. Navigate to http://localhost:5000/swagger/index.html
  2. Obtain token
    POST /api/auth
    {
        "username": "<your-username>",
        "password": "<your-password>"
    }
  1. Enjoy

Getting started using VisualStudio

  1. start an postgres instance
  2. update appsettings.Development.json
  3. Build
  4. Run and debug
  5. Enjoy

Adding EF migrations

Run the following command in the project root folder

dotnet ef migrations add MyNewMigration --project .\src\Vote.Monitor.Domain --startup-project .\src\Vote.Monitor.Api

Polling stations feature

documentation

Confguration

File Storage

For local developemnt you can use your lcoal file ssytem for storage by setting the file storge type in appconfig as follows.

 "FileStorage": {
   "FileStorageType": "LocalDisk",
   "LocalDisk": {
     "Path": "Uploads"
   },
   "S3": {
     ...
   }
 }

To use S3 file storage you need to set "FileStorageType": "S3", and need to have the following environment variables set, with the key ID referencing an IAM user with permissions restricted to only S3.

 "AWS_ACCESS_KEY_ID": "",
 "AWS_SECRET_ACCESS_KEY": "",
 "AWS_REGION": ""

Alternatively, you can use a locally configured aws profile.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 80.4%
  • TypeScript 17.7%
  • JavaScript 0.8%
  • HTML 0.8%
  • Dockerfile 0.2%
  • CSS 0.1%
0