dure-mycart, fork of mycart.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Environment Variables (.env):
• XMPP_DOMAIN - Your domain (required)
• MYCART_DOMAIN - Must match XMPP_DOMAIN for shared SSL
• XMPP_ADMIN - Admin user (e.g., [email protected])
• PROSODY_LOGLEVEL - Logging level (info/debug/warn/error)
• PROSODY_RETENTION_DAYS - Message retention (default: 90)
Image: Built from xmpp-proxy-stack/Dockerfile → ghcr.io/dure-one/dure-mycart-prosody:0.0
Includes mycart + xmpp-proxy + fail2ban-rs + Prosody configurations
No configuration needed. Database stored in ./lc_base/data.db.
bash
Install sqlc
make install-sqlc查看完整 README ↗# Clone
git clone https://github.com/dure-one/dure-mycart.git
cd dure-mycart
# Build
go build -o dure-mycart
# Initialize
./dure-mycart init
# Run
./dure-mycart serve
Access at http://localhost:8080
# Download latest release
curl -L https://github.com/dure-one/dure-mycart/releases/latest/download/dure-mycart-linux-amd64 -o dure-mycart
chmod +x dure-mycart
# Initialize
./dure-mycart init
# Run
./dure-mycart serve
docker run -v ./lc_base:/lc_base -v ./lc_digitals:/lc_digitals -v ./lc_uploads:/lc_uploads --rm ghcr.io/dure-one/dure-mycart:latest init
docker run --name dure-mycart --restart unless-stopped -p 8080:8080 -v ./lc_base:/lc_base -v ./lc_digitals:/lc_digitals -v ./lc_uploads:/lc_uploads ghcr.io/dure-one/dure-mycart:latest
Image: Built from Dockerfile → ghcr.io/dure-one/dure-mycart:latest
3-Container Architecture:
dure-mycart: Pure HTTP server (port 80/tcp)xmpp-proxy: XMPP traffic - QUIC (443/udp), Direct TLS (5222, 5223, 5269/tcp)prosody: XMPP server backendcd prosody-mycart-stack
# Copy and configure environment
cp .env.example .env
# Edit .env with your domain and settings
# Production (pull images)
docker compose up -d
# Development (build from source)
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
# Testing (use test images)
docker compose -f docker-compose.yml -f docker-compose.test.yml up -d
Environment Variables (.env):
MYCART_IMAGE_TAG - Image tag (latest/test/custom)XMPP_PROXY_IMAGE_TAG - xmpp-proxy image tagXMPP_DOMAIN - Your domain (required)MYCART_DOMAIN - Must match XMPP_DOMAIN for shared SSLXMPP_ADMIN - Admin user (e.g., [email protected])Images:
ghcr.io/dure-one/dure-mycart:latest - Main applicationghcr.io/nikescar/xmpp-proxy:latest - XMPP reverse proxyprosodyim/prosody:13.0 - XMPP serverNo configuration needed. Database stored in ./lc_base/data.db.
./dure-mycart install \
--email [email protected] \
--password yourpass \
--domain localhost \
--db postgres \
--db-dsn 'postgres://user:password@host:5432/dure-mycart?sslmode=disable'
# Via command line
./dure-mycart serve --db postgres --db-dsn 'postgres://...'
# Via environment variables
export MYCART_DB_DRIVER=postgres
export MYCART_DB_DSN='postgres://user:password@host:5432/dure-mycart?sslmode=disable'
./dure-mycart serve
docker run --name dure-mycart --restart unless-stopped -p 8080:8080 \
-e MYCART_DB_DRIVER=postgres \
-e MYCART_DB_DSN='postgres://user:password@host:5432/dure-mycart?sslmode=disable' \
-v ./lc_base:/lc_base \
-v ./lc_digitals:/lc_digitals \
-v ./lc_uploads:/lc_uploads \
ghcr.io/dure-one/dure-mycart:latest
dure-mycart supports two SQL backends (choose at build time):
Both support SQLite + PostgreSQL and pass identical tests.
# Install sqlc
make install-sqlc
# Generate type-safe code from SQL
make sqlc-generate
# Build with sqlc backend
make build-sqlc
# Test all combinations (raw+sqlc × SQLite+PostgreSQL)
make test-queries-all
See ./optional_sqlc_support.md for:
Visit http://localhost:8080/_/install or run:
./dure-mycart install --email [email protected] --password yourpass --domain localhost
This repository is a three-tier fork with the following feature additions:
| Repository | Branch | Added Features |
|---|---|---|
shurco/mycart | main | • Product variants• Product image ordering |
nikescar/mycart | main_dure | • Optional sqlc support with build tag |
dure-one/dure-mycart | main | • Seller info admin/site pages and API• Responder (workflows, messages) admin/site pages and API• Prosody docker-compose integrations |