diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..310db2f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Build +FROM golang:latest as go_build +WORKDIR /go/src/github.com/simon987/task_tracker/ + +COPY . . +RUN go get ./main/ && GOOS=linux CGO_ENABLED=0 go build -a -installsuffix cgo -o tt_api ./main/ + +# Execute in alpine +FROM alpine:latest +WORKDIR /root + +COPY --from=go_build ["/go/src/github.com/simon987/task_tracker/tt_api",\ + "/go/src/github.com/simon987/task_tracker/schema.sql",\ + "/go/src/github.com/simon987/task_tracker/config.yml",\ + "./"] +CMD ["./tt_api"] diff --git a/web/angular/src/app/index/index.component.css b/web/angular/src/app/index/index.component.css new file mode 100644 index 0000000..0304455 --- /dev/null +++ b/web/angular/src/app/index/index.component.css @@ -0,0 +1,12 @@ +h3 { + border-bottom: 1px solid rgba(0,0,0,.12); + font-weight: 300; + font-size: 24px; + line-height: 32px; + margin: 40px 0 20px; + padding-bottom: 3px; +} + +pre { + color: #ff4081; +} diff --git a/web/angular/src/app/index/index.component.html b/web/angular/src/app/index/index.component.html new file mode 100644 index 0000000..8ce2769 --- /dev/null +++ b/web/angular/src/app/index/index.component.html @@ -0,0 +1,74 @@ +
+ + + task_tracker + "simple tracker that aims to blah blah" + + + +

Get started

+ + + +

Create a project and associate it to a git repository. + Payload URL for webhooks is is:

+
{{apiService.url}}/receivewebhook
+ +

Workers will be made aware of version changes on the master branch + when they assign themselves to new tasks:

+ +
{{
+                        'GET /task/get\n\n{\n' +
+                        '  "id": 24,\n' +
+                        '  "priority": 1,\n' +
+                        '  ...\n' +
+                        '  "project": {\n' +
+                        '    "id": 1,\n' +
+                        '    ...\n' +
+                        '    "version": "<' + ('index.version'|translate) +
+                        '>",\n  }\n}'}}
+                    
+
+ + +

Register a worker

+
{{
+                        'POST /worker/create\n{\n' +
+                        '  "alias": "' + ('index.alias'|translate) +
+                        '"\n}\n\n'}}
+

Tracker response:

+
{{
+                        '{\n' +
+                        '  "ok": true,\n' +
+                        '  "content": {\n' +
+                        '    "worker": {\n' +
+                        '      "id": 45,\n' +
+                        '      "created": 1550442984,\n' +
+                        '      "alias": "' + ('index.alias'|translate) +
+                        '",\n      "secret": "PvFRQZK7CpSP+4fc0iczfn++PbWh7qMLVfO1+Y3d6X4="\n' +
+                        '    }\n' +
+                        '  }\n' +
+                        '}'}}
+ +

+ Workers need to request access to private or hidden projects to submit new tasks. + Public projects do not require any additional configuration.

+
{{
+                        'POST /project/request_access\n{\n' +
+                        '  "assign": true,\n' +
+                        '  "submit": true,\n' +
+                        '  "project": 23\n}'
+                        }}
+
+ +

You will be given READ, EDIT and MANAGE_ACCESS roles from projects you create. + You can also give access to other project managers from the project permissions page

+
+ + + {{index + 1}} + +
+
+
+
diff --git a/web/angular/src/app/index/index.component.ts b/web/angular/src/app/index/index.component.ts new file mode 100644 index 0000000..462b239 --- /dev/null +++ b/web/angular/src/app/index/index.component.ts @@ -0,0 +1,17 @@ +import {Component, OnInit} from '@angular/core'; +import {ApiService} from "../api.service"; + +@Component({ + selector: 'app-index', + templateUrl: './index.component.html', + styleUrls: ['./index.component.css'] +}) +export class IndexComponent implements OnInit { + + constructor(public apiService: ApiService) { + } + + ngOnInit() { + } + +}