Compare commits
3 Commits
c3e078c9c6
...
hedgeagent
| Author | SHA1 | Date | |
|---|---|---|---|
| f3e3a802ab | |||
|
|
9eff2d9c1a | ||
|
|
d76790c22c |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,6 +16,8 @@ backups/
|
||||
*.log
|
||||
*.sqlite
|
||||
|
||||
*~
|
||||
|
||||
# ignore config files
|
||||
config.json
|
||||
.sequelizerc
|
||||
|
||||
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
############################
|
||||
# 1) Builder: bygg HedgeDoc
|
||||
############################
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# H??mta din branch som tarball (ingen git beh??vs)
|
||||
ADD https://git.sa6anw.se/sa6anw/hedgedoc/archive/refs/heads/hedgeagent/1.10.5.tar.gz /tmp/hedgedoc.tar.gz
|
||||
|
||||
RUN tar -xzf /tmp/hedgedoc.tar.gz --strip-components=1 \
|
||||
&& rm /tmp/hedgedoc.tar.gz
|
||||
|
||||
# Installera deps + bygg frontend/backend
|
||||
RUN corepack enable \
|
||||
&& yarn install --immutable \
|
||||
&& yarn build
|
||||
|
||||
|
||||
########################################
|
||||
# 2) Runtime: officiell HedgeDoc-image
|
||||
########################################
|
||||
FROM quay.io/hedgedoc/hedgedoc:1.10.5
|
||||
|
||||
USER root
|
||||
|
||||
# Ers??tt upstream-koden
|
||||
RUN rm -rf /hedgedoc
|
||||
|
||||
# Kopiera f??rdigbyggd app med r??tt UID/GID
|
||||
COPY --from=builder --chown=10000:10000 /build /hedgedoc
|
||||
|
||||
USER 10000
|
||||
18
README.md
18
README.md
@@ -1,3 +1,21 @@
|
||||
# HedgeDoc-HedgeAgent
|
||||
|
||||
This is a customized version that makes it possible to invite an AI agent to a note via the menu. "Invite Agent" sends the `note_id` to hedgeagent.
|
||||
|
||||
To start an instance for development, the following is required:
|
||||
1. ```cp config.json.example config.json ```
|
||||
2. Update ```"domain": "change this" ```
|
||||
3. ```.yarn/releases/yarn-4.12.0.cjs install```
|
||||
4. ```.yarn/releases/yarn-4.12.0.cjs run build```
|
||||
5. ```.yarn/releases/yarn-4.12.0.cjs start```
|
||||
|
||||
To start for production:
|
||||
1. `docker compose up -d`
|
||||
|
||||
Note: Use UID 10000 for data folders.
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
# HedgeDoc
|
||||
|
||||
50
docker-compose.yaml
Normal file
50
docker-compose.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
services:
|
||||
database:
|
||||
image: postgres:13.4-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=hedgedoc
|
||||
- POSTGRES_PASSWORD=password
|
||||
- POSTGRES_DB=hedgedoc
|
||||
volumes:
|
||||
- ./db:/var/lib/postgresql/data
|
||||
restart: always
|
||||
networks:
|
||||
- internal
|
||||
|
||||
app:
|
||||
build: .
|
||||
image: hedgedoc-hedgeagent:1.10.5
|
||||
container_name: hedgedoc
|
||||
environment:
|
||||
CMD_DB_URL: postgres://hedgedoc:password@database:5432/hedgedoc
|
||||
CMD_PORT: "3000"
|
||||
CMD_HOST: "0.0.0.0"
|
||||
CMD_DOMAIN: hedgedoc.sa6anw.se
|
||||
CMD_URL_ADDPORT: "false"
|
||||
CMD_PROTOCOL_USESSL: "true"
|
||||
CMD_EMAIL: "true"
|
||||
CMD_ALLOW_EMAIL_REGISTER: "true"
|
||||
volumes:
|
||||
- ./uploads:/hedgedoc/public/uploads
|
||||
restart: always
|
||||
depends_on:
|
||||
- database
|
||||
# Since I use Caddy I don't need this
|
||||
# ports:
|
||||
# - "3000:3000"
|
||||
|
||||
## If you use Caddy like I do keep below
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
|
||||
labels:
|
||||
caddy: hedgedoc.sa6anw.se
|
||||
caddy.reverse_proxy: "{{upstreams 3000}}"
|
||||
|
||||
networks:
|
||||
internal:
|
||||
internal: true
|
||||
proxy:
|
||||
external: true
|
||||
## If you don't, you can deleta all of this
|
||||
Reference in New Issue
Block a user