mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
Shared dirs almost ready :D
This commit is contained in:
10
Makefile
10
Makefile
@@ -147,7 +147,9 @@ define container_build
|
||||
$(eval TAG := $(PROJECT_REGISTRY)/$(CONTAINER):$(VERSION)), \
|
||||
)
|
||||
|
||||
sudo mount -o bind src/shared src/landing/landing/shared
|
||||
docker buildx build --load -t $(TAG) -f $(strip $(subst $(SPACE),,$(call container_location,$(CONTAINER))))/Dockerfile.$(ENVIRONMENT) ./$(strip $(subst $(SPACE),,$(call container_location,$(CONTAINER))))/. $(ARGS) $(call labels,$(shell echo $(CONTAINER_NAME) | tr '[:lower:]' '[:upper:]')) --no-cache
|
||||
sudo umount /src/landing/landing/shared
|
||||
endef
|
||||
|
||||
define container_location
|
||||
@@ -161,3 +163,11 @@ define container_version
|
||||
$(shell echo $(strip $(strip $(CONTAINER_$(CONTAINER_NAME)_VERSION))) | tr -d '[:space:]'), \
|
||||
$(error Version data for container $(1) not found))
|
||||
endef
|
||||
|
||||
define mount_shared
|
||||
$(sudo mount -o bind src/shared src/landing/landing/shared)
|
||||
endef
|
||||
|
||||
define unmount_shared
|
||||
$(sudo umount src/shared)
|
||||
endef
|
||||
|
||||
@@ -23,6 +23,7 @@ services:
|
||||
- ./src/landing/landing:/app/landing
|
||||
- ./src/landing/assets:/app/assets
|
||||
- ./src/landing/rxconfig.py:/app/rxconfig.py
|
||||
- ./src/shared:/app/landing/shared
|
||||
networks:
|
||||
- caddy
|
||||
|
||||
@@ -33,9 +34,11 @@ services:
|
||||
- ./src/about/about:/app/about
|
||||
- ./src/about/assets:/app/assets
|
||||
- ./src/about/rxconfig.py:/app/rxconfig.py
|
||||
- ./src/shared:/app/about/shared
|
||||
networks:
|
||||
- caddy
|
||||
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
name: caddy
|
||||
|
||||
@@ -51,4 +51,3 @@ RUN /app/.venv/bin/pip install -r /app/requirements.txt
|
||||
|
||||
# The following lines are for the specific command for the application.
|
||||
CMD reflex init && reflex run --env dev
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from .navbar import navbar
|
||||
from landing.shared.components import navbar
|
||||
from .footer import footer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from landing.route import Route
|
||||
|
||||
from .index import index
|
||||
from .page404 import page404
|
||||
from landing.shared.pages import page404
|
||||
|
||||
routes = [
|
||||
*[r for r in locals().values() if isinstance(r, Route)],
|
||||
|
||||
@@ -36,7 +36,7 @@ def webpage(path: str, title: str = "Timothy Pidashev", props=None) -> Callable:
|
||||
The component with the template applied.
|
||||
"""
|
||||
# Import here to avoid circular imports.
|
||||
from landing.components.navbar import navbar
|
||||
from landing.shared.components.navbar import navbar
|
||||
from landing.components.footer import footer
|
||||
|
||||
# Wrap the component in the template.
|
||||
|
||||
1
src/shared/components/__init__.py
Normal file
1
src/shared/components/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .navbar import navbar
|
||||
1
src/shared/pages/__init__.py
Normal file
1
src/shared/pages/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .page404 import page404
|
||||
Reference in New Issue
Block a user