aau-giraf / web-api

The backend API for GIRAF — a .NET-core project written in C#.
GNU General Public License v3.0
2 stars 5 forks source link

Dockerization of local environment #329

Closed JMyrtue closed 11 months ago

JMyrtue commented 1 year ago

Description

Define a Docker Compose file for local development. Replaces #192.

Possible Suggested Solution

Definition of Done

JMyrtue commented 12 months ago

Completed, but missing functionality from #327 before it is usable.

Will be merged with the above mentioned issue.

KristianS93 commented 12 months ago

In regards of using the sample data, if we in the dockerfile specify that we will run the application with "--sample-data" instead of "--list" to show the options, we will trigger the running of the sample data. I have tested that if data already exist it will not override the inserted data.

This brings us to the migration, in order for this to work, we have to create a clause that when the program is run with the LocalDocker environment variable we do a check if the database is connected and then we use the context.Database.Migration. function.