!Pipfile.lock
!package.json
!package-lock.json
-!flatnotes/**
+!client/**
+!server/**
!entrypoint.sh
!.htmlnanorc
.yarn/install-state.gz
.pnp.*
-
# Custom
.vscode/
data/
COPY package.json package-lock.json .htmlnanorc ./
RUN npm ci
-COPY flatnotes/src ./flatnotes/src
+COPY client ./client
RUN npm run build
# Runtime Container
COPY LICENSE Pipfile Pipfile.lock ./
RUN pipenv install --deploy --ignore-pipfile --system
-COPY flatnotes ./flatnotes
-COPY --from=build ${BUILD_DIR}/flatnotes/dist ./flatnotes/dist
+COPY server ./server
+COPY --from=build ${BUILD_DIR}/client/dist ./client/dist
VOLUME /data
EXPOSE 8080/tcp
restart: unless-stopped
```
-See the [Environment Variables](https://github.com/Dullage/flatnotes/wiki/Environment-Variables) article in the wiki for a full list of configuration options.
+See the [Environment Variables](https://github.com/dullage/flatnotes/wiki/Environment-Variables) article in the wiki for a full list of configuration options.
## Roadmap
flatnotes_command="python -m \
uvicorn \
main:app \
- --app-dir flatnotes \
+ --app-dir server \
--host 0.0.0.0 \
--port 8080 \
--proxy-headers \
"name": "flatnotes",
"version": "3.6.1",
"description": "A database-less note taking web app that utilises a flat folder of markdown files for storage.",
- "main": "flatnotes/src/index.html",
+ "main": "client/index.html",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "build": "parcel build flatnotes/src/index.html --out-dir flatnotes/dist",
- "watch": "parcel flatnotes/src/index.html --out-dir flatnotes/dist"
+ "build": "parcel build client/index.html --out-dir client/dist",
+ "watch": "parcel client/index.html --out-dir client/dist"
},
"author": "Adam Dullage",
"license": "MIT",
[tool.isort]
profile = "black"
line_length = 79
-src_paths = ["flatnotes"]
+src_paths = ["server"]
@app.get("/new", include_in_schema=False)
@app.get("/note/{title}", include_in_schema=False)
def root(title: str = ""):
- with open("flatnotes/dist/index.html", "r", encoding="utf-8") as f:
+ with open("client/dist/index.html", "r", encoding="utf-8") as f:
html = f.read()
return HTMLResponse(content=html)
return FileResponse(filepath)
-app.mount("/", StaticFiles(directory="flatnotes/dist"), name="dist")
+app.mount("/", StaticFiles(directory="client/dist"), name="dist")