Skip to content

Commit

Permalink
build and deploy .NET Core Web API
Browse files Browse the repository at this point in the history
  • Loading branch information
ddaspit committed Dec 19, 2017
1 parent 633a9b4 commit 5f56ada
Show file tree
Hide file tree
Showing 17 changed files with 565 additions and 135 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ src/vendor/
test/CodeCoverage/
vagrant_ansible_inventory_*
test/app/protractorConfBrowserStack.js
artifacts/

# CSS files generated from Sass
src/angular-app/bellows/apps/**/*.css
Expand Down
72 changes: 55 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,57 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "https://languageforge.local",
"webRoot": "${workspaceRoot}"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
}
]
"version": "0.2.0",
"compounds": [
{
"name": "Full App",
"configurations": [".NET Core", "XDebug", "Launch Chrome"]
}
],
"configurations": [
{
"name": ".NET Core",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "dotnet",
"program": "${workspaceRoot}/src/netcore-api/SIL.XForge.WebApi.Server/bin/Debug/netcoreapp2.0/SIL.XForge.WebApi.Server.dll",
"args": [],
"cwd": "${workspaceRoot}/src/netcore-api/SIL.XForge.WebApi.Server/",
"stopAtEntry": false,
"console": "integratedTerminal",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "https://languageforge.local",
"webRoot": "${workspaceRoot}"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"webRoot": "${workspaceRoot}"
},
{
"name": "XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"windows":{
"localSourceRoot": "${workspaceRoot}",
"serverSourceRoot": "${env:WSL_XFORGE_PATH}"
}
},
{
"name": "PHP script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
21 changes: 17 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "2.0.0",
"tasks": [
{
"taskName": "build",
"label": "webpack",
"type": "shell",
"windows": {
"command": "bash -c 'gulp webpack-lf'"
Expand All @@ -22,7 +22,7 @@
}
},
{
"taskName": "watch",
"label": "webpack-watch",
"type": "shell",
"isBackground": true,
"windows": {
Expand All @@ -37,7 +37,7 @@
"problemMatcher": []
},
{
"taskName": "npm install",
"label": "npm install",
"type": "shell",
"windows": {
"command": "bash -c 'npm install'"
Expand All @@ -51,7 +51,7 @@
"problemMatcher": []
},
{
"taskName": "sass",
"label": "sass",
"type": "shell",
"windows": {
"command": "bash -c 'gulp sass'"
Expand All @@ -63,6 +63,19 @@
"reveal": "silent"
},
"problemMatcher": "$node-sass"
},
{
"label": "dotnet",
"command": "dotnet build",
"type": "shell",
"group": "build",
"presentation": {
"reveal": "silent"
},
"options": {
"cwd": "${workspaceRoot}/src/netcore-api"
},
"problemMatcher": "$msCompile"
}
]
}
9 changes: 6 additions & 3 deletions deploy/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
pre_tasks:
- name: "Add .NET Core | add source"
apt_repository:
repo: "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ {{base_distribution_release}} main"
repo: "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-{{base_distribution_release}}-prod {{base_distribution_release}} main"
state: present
when: base_distribution == 'ubuntu'
- name: "Add .NET Core | add key"
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=417A0893 state=present
apt_key:
id: BE1229CF
url: https://packages.microsoft.com/keys/microsoft.asc
keyring: /etc/apt/trusted.gpg.d/microsoft.gpg
when: base_distribution == 'ubuntu'
- name: "Add GeoIP Update | add source"
apt_repository:
Expand All @@ -43,7 +46,7 @@
- name: install packages
apt: name="{{item}}" state=present update_cache='yes'
with_items:
- dotnet-sdk-2.0.0
- dotnet-sdk-2.0.2
- geoipupdate
- libapache2-mod-php
- mongodb-server
Expand Down
16 changes: 12 additions & 4 deletions deploy/vars_palaso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ apache_vhosts:
- has_ssl: false
port: 80
server_alias: []
proxy: '/machine/ "unix:///tmp/machine-web-api.sock|http://127.0.0.1/" timeout=21600'
proxy:
- '/api2/ http://localhost:5000/ timeout=21600'
- '/machine/ http://localhost:5001/ timeout=21600'
- server_name: languageforge.org
server_admin: [email protected]
server_file_name: languageforge_org
Expand All @@ -70,7 +72,9 @@ apache_vhosts:
port: 80
server_alias:
- languageforge.local
proxy: '/machine/ "unix:///tmp/machine-web-api.sock|http://127.0.0.1/" timeout=21600'
proxy:
- '/api2/ http://localhost:5000/ timeout=21600'
- '/machine/ http://localhost:5001/ timeout=21600'
- server_name: scriptureforge.org
server_admin: [email protected]
server_file_name: scriptureforge_org
Expand All @@ -84,9 +88,13 @@ apache_vhosts:
port: 80
server_alias:
- scriptureforge.local
proxy: '/machine/ "unix:///tmp/machine-web-api.sock|http://127.0.0.1/" timeout=21600'
proxy:
- '/api2/ http://localhost:5000/ timeout=21600'
- '/machine/ http://localhost:5001/ timeout=21600'
- has_ssl: true
port: 443
certificate_file: "scriptureforge.pem"
key_file: "scriptureforge.key"
proxy: '/machine/ "unix:///tmp/machine-web-api.sock|http://127.0.0.1/" timeout=21600'
proxy:
- '/api2/ http://localhost:5000/ timeout=21600'
- '/machine/ http://localhost:5001/ timeout=21600'
Loading

0 comments on commit 5f56ada

Please sign in to comment.