-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to dockerize, add todoist sync button
- Loading branch information
Micah Fitzgerald
committed
Aug 23, 2024
1 parent
eb86093
commit 41968ac
Showing
19 changed files
with
228 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:slim AS backend | ||
|
||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
||
WORKDIR /app | ||
|
||
COPY ./ ./ | ||
|
||
RUN uv sync | ||
ENV VIRTUAL_ENV=/app/.venv | ||
# Place executables in the environment at the front of the path | ||
ENV PATH="/app/.venv/bin:$PATH" | ||
|
||
CMD ["fastapi", "run", "main/main.py", "--port", "80"] | ||
|
||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"listeners": { | ||
"*:80": { | ||
"pass": "applications/fastapi" | ||
} | ||
}, | ||
|
||
"applications": { | ||
"fastapi": { | ||
"type": "python3", | ||
"path": "/app/backend", | ||
"home": "/app/backend/.venv", | ||
"module": "main", | ||
"callable": "app" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:latest as ui | ||
|
||
WORKDIR /app/ui | ||
|
||
COPY package*.json . | ||
RUN npm install -g pnpm | ||
RUN pnpm install | ||
|
||
ADD ./ ./ | ||
|
||
RUN pnpm ng build --configuration=production --base-href /ui/ --deploy-url /ui/ | ||
|
||
FROM nginx:alpine | ||
COPY --from=ui /app/ui/dist/ui/ /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server { | ||
listen 8000; | ||
# Add here the IP address of your server | ||
# or a domain pointing to that IP (e.g., example.com or www.example.com) | ||
# server_name XXXX; | ||
keepalive_timeout 5; | ||
client_max_body_size 4G; | ||
location /api { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
proxy_redirect off; | ||
|
||
if (!-f $request_filename) { | ||
proxy_pass http://backend; | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
19 changes: 19 additions & 0 deletions
19
ui/src/app/components/task-todoist-badge/task-todoist-badge.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<span *ngIf="task.todoist_task_id" class="label"> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="loading_screen--logo"> | ||
<g fill="none" fill-rule="evenodd"> | ||
<path fill="#E44332" d="M56 0H8C3.6 0 0 3.6 0 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V8c0-4.4-3.6-8-8-8" | ||
class="logo_bg" /> | ||
<g fill="#FFF" class="logo_stripe"> | ||
<path | ||
d="M13.672 29.986c1.13-.652 25.344-14.585 25.9-14.906.554-.32.582-1.302-.038-1.656-.621-.354-1.8-1.024-2.239-1.28a2.04 2.04 0 0 0-1.995.023c-.309.178-21.002 12.077-21.694 12.47a2.7 2.7 0 0 1-2.677 0L0 18.286v5.397c2.66 1.55 9.274 5.402 10.877 6.307.957.54 1.873.527 2.795-.005" /> | ||
<path | ||
d="M13.672 40.77c1.13-.652 25.344-14.585 25.9-14.906.554-.32.582-1.303-.038-1.657-.621-.354-1.8-1.023-2.239-1.28a2.04 2.04 0 0 0-1.995.024c-.309.178-21.002 12.076-21.694 12.47a2.7 2.7 0 0 1-2.677-.001C10.277 35.043 0 29.07 0 29.07v5.397c2.66 1.55 9.274 5.401 10.877 6.306.957.54 1.873.527 2.795-.004" /> | ||
<path | ||
d="m13.672 51.553 25.9-14.906c.554-.32.582-1.302-.038-1.656-.621-.354-1.8-1.024-2.239-1.28a2.04 2.04 0 0 0-1.995.023c-.309.179-21.002 12.077-21.694 12.47a2.7 2.7 0 0 1-2.677 0L0 39.853v5.398c2.66 1.549 9.274 5.401 10.877 6.306.957.54 1.873.527 2.795-.005" /> | ||
</g> | ||
</g> | ||
</svg> | ||
</span> | ||
<span *ngIf="!task.todoist_task_id" style="float: right;"> | ||
|
||
</span> |
23 changes: 23 additions & 0 deletions
23
ui/src/app/components/task-todoist-badge/task-todoist-badge.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TaskTodoistBadgeComponent } from './task-todoist-badge.component'; | ||
|
||
describe('TaskTodoistBadgeComponent', () => { | ||
let component: TaskTodoistBadgeComponent; | ||
let fixture: ComponentFixture<TaskTodoistBadgeComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [TaskTodoistBadgeComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(TaskTodoistBadgeComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
ui/src/app/components/task-todoist-badge/task-todoist-badge.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { TaskSchema } from 'src/client'; | ||
|
||
@Component({ | ||
selector: 'app-task-todoist-badge', | ||
templateUrl: './task-todoist-badge.component.html', | ||
styleUrl: './task-todoist-badge.component.css' | ||
}) | ||
export class TaskTodoistBadgeComponent { | ||
@Input() task: TaskSchema; | ||
public class: string; | ||
public ngOnInit() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.