diff --git a/.gitignore b/.gitignore index 9902a84..39d12a9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ # AI generated content CLAUDE.md + +# Content is on separate repository content/ diff --git a/README b/README index 9ff4d36..1bd73fb 100644 --- a/README +++ b/README @@ -2,12 +2,6 @@ This is the source code for https://wiki.cafe. -# TODO: -- [ ] Implement dark mode -- [ ] Proper typography. Potentially use clamp. Research appropriate proportions. -- [ ] Add links to other sites. -- [ ] Support adding modification date to pages. - ## Reference Serve Hugo site with Docker diff --git a/compose.dev.yaml b/compose.dev.yaml deleted file mode 100644 index 8241026..0000000 --- a/compose.dev.yaml +++ /dev/null @@ -1,4 +0,0 @@ - -services: - hugo: - image: hugomods/hugo:base-non-root-0.145.0 diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..1bfac1d --- /dev/null +++ b/compose.yaml @@ -0,0 +1,60 @@ +services: + + hugo: + image: hugomods/hugo:base-non-root-0.145.0 + volumes: + - project:/src/site + - content:/src/site/content + - public:/src/site/public + networks: + - proxy + command: 'hugo server -D -M -s site --bind="0.0.0.0" -b="https://draft.wiki.cafe" --appendPort=false' + # command: 'tail -f /dev/null' + deploy: + update_config: + failure_action: rollback + order: start-first + labels: + - "traefik.enable=true" + - "traefik.http.services.apex_site.loadbalancer.server.port=1313" + - "traefik.http.routers.apex_site.rule=Host(`draft.wiki.cafe`)" + - "traefik.http.routers.apex_site.entrypoints=web-secure" + - "traefik.http.routers.apex_site.tls.certresolver=production" + - "caddy=https://draft.wiki.cafe" + - "caddy.reverse_proxy={{upstreams 1313}}" + - "caddy.tls.on_demand=" + + web-server: + image: nginx:1.23-alpine + volumes: + - public:/usr/share/nginx/html:ro + networks: + - proxy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost"] + interval: 10s + timeout: 10s + retries: 10 + start_period: 15s + deploy: + update_config: + failure_action: rollback + order: start-first + labels: + - "traefik.enable=true" + - "traefik.http.services.apex_wiki_cafe.loadbalancer.server.port=80" + - "traefik.http.routers.apex_wiki_cafe.rule=Host(`wiki.cafe`)" + - "traefik.http.routers.apex_wiki_cafe.entrypoints=web-secure" + - "traefik.http.routers.apex_wiki_cafe.tls.certresolver=production" + - "caddy=https://wiki.cafe" + - "caddy.reverse_proxy={{upstreams 80}}" + - "caddy.tls.on_demand=" + +networks: + proxy: + external: true + +volumes: + project: + content: + public: \ No newline at end of file diff --git a/static/admin/config.yml b/static/admin/config.yml new file mode 100644 index 0000000..c9866eb --- /dev/null +++ b/static/admin/config.yml @@ -0,0 +1,21 @@ +backend: + name: gitea + base_url: https://git.coopcloud.tech + repo: wiki-cafe/wiki.cafe-content + branch: main + api_root: /api/v1 + auth_endpoint: /login/oauth/authorize + app_id: e2117eef-a201-4eb6-9885-170c799b515b +media_folder: static/img +public_folder: /img +collections: + - name: "pages" + label: "Pages" + folder: "/pages" + create: true + slug: "{{slug}}" + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Date", name: "date", widget: "datetime" } + - { label: "Body", name: "body", widget: "markdown" } + - { label: "Tags", name: "tags", widget: "list" } diff --git a/static/admin/index.html b/static/admin/index.html new file mode 100644 index 0000000..69eff8e --- /dev/null +++ b/static/admin/index.html @@ -0,0 +1,13 @@ + + +
+ + + +