Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/ Update CORS Policy and Database Migrations #38

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
POSTGRES_DB=whombat
POSTGRES_USER=postgres
POSTGRES_PASSWORD=whombat
DOMAIN=localhost
AUDIO_DIR=/home/user/
PORT=5000
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV UV_LINK_MODE=copy
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=back/uv.lock,target=uv.lock \
--mount=type=bind,source=back/pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev
uv sync --frozen --no-install-project --no-dev --all-extras

# Then, add the rest of the project source code and install it
# Installing separately from its dependencies allows optimal layer caching
Expand All @@ -62,7 +62,7 @@ COPY --from=guide_builder /guide/out/ /app/src/whombat/user_guide/
COPY --from=frontend_builder /front/out/ /app/src/whombat/statics/

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
uv sync --frozen --no-dev --all-extras

# === STEP 4 === Final Image

Expand All @@ -75,6 +75,8 @@ COPY --from=builder --chown=app:app /app /app
# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

WORKDIR /app

# Create a directory for audio files
RUN mkdir /audio
RUN mkdir /data
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BACK_DIR := back
.PHONY: dev dev-front dev-back dev-docs storybook install-dev build-frontend build-guide bundle publish clean

dev:
docker-compose -f compose-dev.yaml up --watch --build frontend backend
docker-compose -f compose.dev.yaml up --watch --build frontend backend

dev-front:
cd $(FRONT_DIR) && npm run dev
Expand Down
2 changes: 1 addition & 1 deletion back/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /code
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --dev
uv sync --frozen --no-install-project --dev --all-extras

ADD . /code

Expand Down
8 changes: 4 additions & 4 deletions back/docs/developer_guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,28 @@ cd whombat
- **Backend and Frontend:**

```bash
docker-compose -f compose-dev.yaml up backend frontend
docker-compose -f compose.dev.yaml up backend frontend
```

Access the Whombat development environment at http://localhost:3000

- **Storybook:**

```bash
docker-compose -f compose-dev.yaml up storybook
docker-compose -f compose.dev.yaml up storybook
```

Access Storybook at http://localhost:6006.

- **Documentation Server:**

```bash
docker-compose -f compose-dev.yaml up docs
docker-compose -f compose.dev.yaml up docs
```

View the documentation at http://localhost:8000.

- **All Services:**
```bash
docker-compose -f compose-dev.yaml up
docker-compose -f compose.dev.yaml up
```
Loading