-
Notifications
You must be signed in to change notification settings - Fork 153
/
.gitpod.yml
123 lines (114 loc) · 5.95 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# https://github.com/gitpod-samples/template-dotnet-core-cli-csharp
# https://www.gitpod.io/docs/introduction/languages/dotnet
# https://github.com/gitpod-samples/template-docker-compose
# https://www.gitpod.io/docs/references/gitpod-yml
# https://www.gitpod.io/docs/configure
# https://www.gitpod.io/docs/configure/workspaces/ports
# https://www.gitpod.io/docs/configure/projects/prebuilds
image:
file: .gitpod.Dockerfile
vscode:
extensions:
- streetsidesoftware.code-spell-checker
- ms-dotnettools.csdevkit
- editorconfig.editorconfig
- vivaxy.vscode-conventional-commits
- humao.rest-client
- ms-azuretools.vscode-docker
- donjayamanne.githistory
- mutantdino.resourcemonitor
- pkief.material-icon-theme
- emmanuelbeziat.vscode-great-icons
- tabnine.tabnine-vscode
- ms-vscode.vs-keybindings
- streetsidesoftware.code-spell-checker
- me-dutour-mathieu.vscode-github-actions
# https://www.gitpod.io/docs/configure/workspaces/tasks#execution-order
tasks:
- name: Install dev cert
#https://learn.microsoft.com/en-us/aspnet/core/security/docker-https?view=aspnetcore-7.0#macos-or-linux
#https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl
#`dotnet dev-certs https --trust` is only supported on macOS and Windows, but we don't get exception because of none trusted cert in our application, if we don't use this cert we get exception. It is likely that we need to trust the certificate in `your browser` and allow to process for none trusted cert.
init: |
dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p 123456
dotnet dev-certs https --trust
- name: Husky Tools Setup
# https://www.gitpod.io/docs/configure/projects
# https://www.gitpod.io/docs/configure/projects/prebuilds
# https://www.gitpod.io/docs/configure/workspaces/tasks
# If prebuild is set up on repository with linking repository to a project, when there is a commit to project `init` commands will execute in prebuild process and its workspace will share with all new created workspace for this project, if we don't have a project when we create a new workspace `init` commands will execute
init: |
npm install
npm run prepare
- name: Restore and Build dotnet
# https://www.gitpod.io/docs/configure/projects
# https://www.gitpod.io/docs/configure/projects/prebuilds
# https://www.gitpod.io/docs/configure/workspaces/tasks
# If prebuild is set up on repository with linking repository to a project, when there is a commit to project `init` commands will execute in prebuild process and its workspace will share with all new created workspace for this project, if we don't have a project when we create a new workspace `init` commands will execute
init: |
gp sync-await docker-bundle # wait for the bellow 'init' to finish
dotnet restore
dotnet build
gp sync-done build-bundle
# each task creates a new terminal window
# https://www.gitpod.io/docs/configure/workspaces/tasks#wait-for-commands-to-complete
- name: Init Docker-Compose
# https://www.gitpod.io/docs/configure/projects/prebuilds
# We load docker on pre-build for increasing speed
init: |
docker-compose -f ./deployments/docker-compose/docker-compose.infrastructure.yaml pull
# https://www.gitpod.io/docs/configure/workspaces/tasks#wait-for-commands-to-complete
# https://github.com/gitpod-io/openvscode-server/discussions/373
gp sync-done docker-bundle
command: |
docker-compose -f ./deployments/docker-compose/docker-compose.infrastructure.yaml up -d
# - name: Run Catalogs in Watch Mode
# # https://www.gitpod.io/docs/configure/workspaces/tasks#wait-for-commands-to-complete
# # https://github.com/gitpod-io/openvscode-server/discussions/373
# init: |
# gp sync-await docker-bundle # wait for the above 'init' to finish
# gp sync-await build-bundle # wait for the above 'init' to finish
# # https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-run#options
# command: |
# cd src/Services/Catalogs/FoodDelivery.Services.Catalogs.Api
# # hot reload doesn't work correctly with --no-build and --no-restore and after each change will restart the app with hot reload app should not be restarted
# dotnet watch -lp Catalogs.Api.Http
#
# - name: Run Identity in Watch Mode
# init: |
# gp sync-await docker-bundle # wait for the above 'init' to finish
# gp sync-await build-bundle # wait for the above 'init' to finish
# command: |
# cd src/Services/Identity/FoodDelivery.Services.Identity.Api
# dotnet watch -lp Identity.Api.Http
#
# - name: Run Customers in Watch Mode
# init: |
# gp sync-await docker-bundle # wait for the above 'init' to finish
# gp sync-await build-bundle # wait for the above 'init' to finish
# command: |
# cd src/Services/Customers/FoodDelivery.Services.Customers.Api
# # hot reload doesn't work correctly with --no-build and --no-restore and after each change will restart the app with hot reload app should not be restarted
# dotnet watch -lp Customers.Api.Http
# https://www.gitpod.io/docs/configure/projects/prebuilds#github-specific-configuration
github:
prebuilds:
# enable for the default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: false
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: false
#https://www.gitpod.io/docs/configure/workspaces/ports#exposing-ports
#https://github.com/gitpod-io/gitpod/issues/1867
ports:
- port: 1000-9000
onOpen: ignore