Skip to content

Commit

Permalink
Add BITCART_STORE_HOST to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Mar 18, 2024
1 parent 2b828d5 commit f28ccf8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ htmlcov/
venv/
compose/plugins/*
!compose/plugins/.gitkeep
.prettiercache
18 changes: 10 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.15.1
hooks:
- id: pyupgrade
args: ["--py38-plus"]
args: ["--py39-plus"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -45,9 +45,11 @@ repos:
args: ["--remove"]
- id: detect-private-key
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1
rev: v4.0.0-alpha.8
hooks:
- id: prettier
require_serial: true
args: ["--cache-location=.prettiercache"]
- repo: local
hooks:
- id: docker-shell-shfmt
Expand Down
2 changes: 2 additions & 0 deletions generator/docker-components/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ services:
LETSENCRYPT_HOST: ${BITCART_ADMIN_HOST}
LETSENCRYPT_EMAIL: ${BITCART_LETSENCRYPT_EMAIL}
BITCART_ADMIN_ROOTPATH: ${BITCART_ADMIN_ROOTPATH:-/}
BITCART_STORE_HOST: ${BITCART_STORE_HOST}
BITCART_STORE_ROOTPATH: ${BITCART_STORE_ROOTPATH:-/}
1 change: 1 addition & 0 deletions generator/rules/03_root_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def rule(services, settings):
with modify_key(services, "admin", "environment") as environment:
environment["BITCART_ADMIN_ROOTPATH"] = environment["BITCART_ADMIN_ROOTPATH"].replace("/", "/admin")
environment["BITCART_ADMIN_API_URL"] = API_URL
environment["BITCART_STORE_HOST"] = settings.HOST or ""
with modify_key(services, "store", "environment") as environment:
environment["BITCART_ADMIN_HOST"] = urljoin(settings.HOST or "", "admin")
environment["BITCART_ADMIN_ROOTPATH"] = environment["BITCART_ADMIN_ROOTPATH"].replace("/", "/admin")
Expand Down

0 comments on commit f28ccf8

Please sign in to comment.