Skip to content

Commit 75d5c14

Browse files
committed
Exposing frontend ports for development
Fixing [#39](#39): - Exposing port 24678 for Vite on frontend in development mode. - Ensuring Nuxt content on `/api/_content` doesn't interfere with backend `/api/v` routes. - Checking for password before hashing on user creation.
1 parent 083b998 commit 75d5c14

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: {{cookiecutter.project_slug}}/backend/app/app/crud/crud_user.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_by_email(self, db: Session, *, email: str) -> Optional[User]:
1616
def create(self, db: Session, *, obj_in: UserCreate) -> User:
1717
db_obj = User(
1818
email=obj_in.email,
19-
hashed_password=get_password_hash(obj_in.password),
19+
hashed_password=get_password_hash(obj_in.password) if obj_in.password is not None else None,
2020
full_name=obj_in.full_name,
2121
is_superuser=obj_in.is_superuser,
2222
)

Diff for: {{cookiecutter.project_slug}}/docker-compose.override.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ services:
6060
labels:
6161
- traefik.enable=true
6262
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
63-
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`)
63+
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api/v`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`)
6464
- traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=80
6565

6666
celeryworker:
@@ -78,6 +78,8 @@ services:
7878
INSTALL_JUPYTER: ${INSTALL_JUPYTER-true}
7979

8080
frontend:
81+
ports:
82+
- "24678:24678"
8183
volumes:
8284
# https://stackoverflow.com/a/32785014
8385
- ./frontend:/frontend

0 commit comments

Comments
 (0)