28 |
29 | {% block javascript %}
30 | {% endblock %}
31 |
32 |
33 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3.8"
2 |
3 | networks:
4 | traefik-public:
5 | external: true
6 |
7 | services:
8 | todo_app:
9 | build:
10 | context: .
11 | dockerfile: Dockerfile
12 | command: /start
13 | image: renceinbox/fastapi-todo:main
14 | networks:
15 | - traefik-public
16 | deploy:
17 | labels:
18 | - traefik.enable=true
19 | - traefik.docker.network=traefik-public
20 | - traefik.constraint-label=traefik-public
21 | - traefik.http.routers.fastapi-todo-http.rule=Host(`todo-fastapi.renceinbox.com`)
22 | - traefik.http.routers.fastapi-todo-http.entrypoints=http
23 | - traefik.http.routers.fastapi-todo-http.middlewares=https-redirect
24 | - traefik.http.routers.fastapi-todo-https.rule=Host(`todo-fastapi.renceinbox.com`)
25 | - traefik.http.routers.fastapi-todo-https.entrypoints=https
26 | - traefik.http.routers.fastapi-todo-https.tls=true
27 | - traefik.http.routers.fastapi-todo-https.tls.certresolver=le
28 | - traefik.http.services.fastapi-todo.loadbalancer.server.port=8001
29 |
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Rommel Terrence Juanillo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/templates/home.html:
--------------------------------------------------------------------------------
1 | {% extends 'base.html' %}
2 |
3 | {% block style %}
4 |
10 | {% endblock %}
11 |
12 | {% block content %}
13 |
14 |
20 |
21 | {% for todo in todos %}
22 | {% include 'todo/item.html' with context %}
23 | {% endfor %}
24 |