Compare commits
2 commits
34c6ec0a62
...
ff554ddcb4
Author | SHA1 | Date | |
---|---|---|---|
ff554ddcb4 | |||
70a84ba1b4 |
10 changed files with 110 additions and 5 deletions
16
.devcontainer/Dockerfile
Normal file
16
.devcontainer/Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
FROM ghcr.io/astral-sh/uv:0.5.25 AS uv
|
||||||
|
FROM python:3.13-slim AS python
|
||||||
|
FROM code.forgejo.org/forgejo/runner:6.2.0@sha256:936c4fef04f0e2bda86c325b8ef40359aeead4740a48b1d5a0c9a112f1185e45 AS forgejo-runner
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm@sha256:6155a486f236fd5127b76af33086029d64f64cf49dd504accb6e5f949098eb7e
|
||||||
|
LABEL repository="www.coastalcommits.com/cswimr/PyZipline"
|
||||||
|
LABEL maintainer="cswimr <seaswimmerthefsh@gmail.com>"
|
||||||
|
|
||||||
|
COPY --from=uv --chown=vscode: /uv /uvx /bin/
|
||||||
|
COPY --from=python --chown=vscode: /usr/local /usr/local
|
||||||
|
COPY --from=forgejo-runner --chown=vscode: /bin/forgejo-runner /bin/forgejo-runner
|
||||||
|
COPY --chown=vscode: .devcontainer/home/* /home/vscode/
|
||||||
|
|
||||||
|
RUN ln -s /usr/local/bin/python3.13 /usr/local/bin/python; \
|
||||||
|
python --version; \
|
||||||
|
python -m ensurepip
|
31
.devcontainer/devcontainer.json
Normal file
31
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"name": "PyZipline",
|
||||||
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
|
"service": "devcontainer",
|
||||||
|
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"charliermarsh.ruff",
|
||||||
|
"ms-python.python",
|
||||||
|
"tekumara.typos-vscode",
|
||||||
|
"tamasfe.even-better-toml",
|
||||||
|
"redhat.vscode-yaml",
|
||||||
|
"DavidAnson.vscode-markdownlint",
|
||||||
|
"aaron-bond.better-comments",
|
||||||
|
"donjayamanne.githistory",
|
||||||
|
"eamodio.gitlens"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"containerEnv": {
|
||||||
|
"DISPLAY": "dummy",
|
||||||
|
"PYTHONUNBUFFERED": "True",
|
||||||
|
"UV_LINK_MODE": "copy",
|
||||||
|
"UV_PYTHON_PREFERENCE": "only-system",
|
||||||
|
"UV_PYTHON_DOWNLOADS": "never",
|
||||||
|
"PROJECT_DIR": "/workspaces/${localWorkspaceFolderBasename}"
|
||||||
|
},
|
||||||
|
"postCreateCommand": "uv sync --frozen",
|
||||||
|
"remoteUser": "vscode"
|
||||||
|
}
|
54
.devcontainer/docker-compose.yml
Normal file
54
.devcontainer/docker-compose.yml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
devcontainer:
|
||||||
|
container_name: devcontainer
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
container_name: zipline-database
|
||||||
|
image: postgres:16
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: zipline
|
||||||
|
POSTGRES_PASSWORD: zipline
|
||||||
|
POSTGRES_DATABASE: zipline
|
||||||
|
volumes:
|
||||||
|
- pg_data:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
zipline:
|
||||||
|
container_name: zipline
|
||||||
|
image: ghcr.io/diced/zipline:v4
|
||||||
|
environment:
|
||||||
|
CORE_SECRET: "secret"
|
||||||
|
CORE_PORT: 3001
|
||||||
|
CORE_HOSTNAME: 0.0.0.0
|
||||||
|
DATABASE_URL: postgres://zipline:zipline@postgres:5432/zipline
|
||||||
|
DATASOURCE_TYPE: local
|
||||||
|
DATASOURCE_LOCAL_DIRECTORY: /zipline/uploads
|
||||||
|
ports:
|
||||||
|
- "3001:3001"
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- data:/zipline/public
|
||||||
|
- themes:/zipline/themes
|
||||||
|
- uploads:/zipline/uploads
|
||||||
|
depends_on:
|
||||||
|
- "postgres"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget -q --spider http://localhost:3001 || exit 1"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
pg_data:
|
||||||
|
data:
|
||||||
|
themes:
|
||||||
|
uploads:
|
3
.devcontainer/home/.bash_aliases
Normal file
3
.devcontainer/home/.bash_aliases
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
alias runactions="forgejo-runner exec --default-actions-url=https://www.coastalcommits.com --gitea-instance=https://www.coastalcommits.com"
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ __pycache__
|
||||||
dev.py
|
dev.py
|
||||||
dist/
|
dist/
|
||||||
pyzipline.egg-info/
|
pyzipline.egg-info/
|
||||||
|
site/
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Exceptions
|
# Exceptions
|
||||||
|
|
||||||
::: pyzipline.exceptions
|
::: exceptions
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Models Reference
|
# Models Reference
|
||||||
|
|
||||||
::: pyzipline.models
|
::: models
|
||||||
|
|
|
@ -6,4 +6,4 @@ These functions are meant for use in other parts of the module. You *probably* s
|
||||||
If there's an endpoint method missing from the main [ZiplineApi](zipline.md) class, you should open an [issue](https://coastalcommits.com/SeaswimmerTheFsh/PyZipline/issues) (or a [pull request](https://coastalcommits.com/SeaswimmerTheFsh/PyZipline/pulls)).
|
If there's an endpoint method missing from the main [ZiplineApi](zipline.md) class, you should open an [issue](https://coastalcommits.com/SeaswimmerTheFsh/PyZipline/issues) (or a [pull request](https://coastalcommits.com/SeaswimmerTheFsh/PyZipline/pulls)).
|
||||||
///
|
///
|
||||||
|
|
||||||
::: pyzipline.rest_adapter
|
::: rest_adapter
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Utilities
|
# Utilities
|
||||||
|
|
||||||
::: pyzipline.utils
|
::: utils
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# ZiplineApi
|
# ZiplineApi
|
||||||
|
|
||||||
::: pyzipline.zipline
|
::: zipline
|
||||||
|
|
Loading…
Add table
Reference in a new issue