netcore-blueprint
Version:
A custom .NET Core project blueprint
22 lines • 972 B
Markdown
0. Run migration first (Package manager console)
- Add-Migration InitialCreate
1. Push the image to docker hub
- chmod +x build-and-push.sh
- run docker desktop as administrator
- docker login
- (git bash) ./build-and-push.sh truonghusk17 innocons-api latest
2. Use the image
- Run docker compose file
3. Clone to repo:
- git remote add origin https://gitlab.com/test1835013/innocons.git
- git branch -M main
- git push -u origin main
4. Add variables to gitlab
- Change these values:
+ truonghusk17/innocons-api
+ truong@192.168.1.20
+ innocons-api
5. Change connection string to connect to DB (Systems Manager)
- In laptop, when running mysql directly: "MySql": "Server=host.docker.internal;port=3306;Database=test9;User=root;",
- In pi, when running mysql in docker container: "MySql": "Server=mysql;Database=test9;User=root;Password=password;AllowPublicKeyRetrieval=true;",
- Localhost: Using the appsetting file in the project as default one