Skip to content

Commit 5fb37d1

Browse files
authored
Merge pull request #38 from mbsantiago/refactor/better-cors-default
Refactor/ Update CORS Policy and Database Migrations
2 parents 7fa94d6 + 0868e7d commit 5fb37d1

File tree

12 files changed

+458
-74
lines changed

12 files changed

+458
-74
lines changed

.env

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
POSTGRES_DB=whombat
2+
POSTGRES_USER=postgres
3+
POSTGRES_PASSWORD=whombat
4+
DOMAIN=localhost
5+
AUDIO_DIR=/home/user/
6+
PORT=5000

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ENV UV_LINK_MODE=copy
4949
RUN --mount=type=cache,target=/root/.cache/uv \
5050
--mount=type=bind,source=back/uv.lock,target=uv.lock \
5151
--mount=type=bind,source=back/pyproject.toml,target=pyproject.toml \
52-
uv sync --frozen --no-install-project --no-dev
52+
uv sync --frozen --no-install-project --no-dev --all-extras
5353

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

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

6767
# === STEP 4 === Final Image
6868

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

78+
WORKDIR /app
79+
7880
# Create a directory for audio files
7981
RUN mkdir /audio
8082
RUN mkdir /data

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BACK_DIR := back
66
.PHONY: dev dev-front dev-back dev-docs storybook install-dev build-frontend build-guide bundle publish clean
77

88
dev:
9-
docker-compose -f compose-dev.yaml up --watch --build frontend backend
9+
docker-compose -f compose.dev.yaml up --watch --build frontend backend
1010

1111
dev-front:
1212
cd $(FRONT_DIR) && npm run dev

back/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /code
55
RUN --mount=type=cache,target=/root/.cache/uv \
66
--mount=type=bind,source=uv.lock,target=uv.lock \
77
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
8-
uv sync --frozen --no-install-project --dev
8+
uv sync --frozen --no-install-project --dev --all-extras
99

1010
ADD . /code
1111

back/docs/developer_guide/quickstart.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,28 @@ cd whombat
117117
- **Backend and Frontend:**
118118

119119
```bash
120-
docker-compose -f compose-dev.yaml up backend frontend
120+
docker-compose -f compose.dev.yaml up backend frontend
121121
```
122122

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

125125
- **Storybook:**
126126

127127
```bash
128-
docker-compose -f compose-dev.yaml up storybook
128+
docker-compose -f compose.dev.yaml up storybook
129129
```
130130

131131
Access Storybook at http://localhost:6006.
132132

133133
- **Documentation Server:**
134134

135135
```bash
136-
docker-compose -f compose-dev.yaml up docs
136+
docker-compose -f compose.dev.yaml up docs
137137
```
138138

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

141141
- **All Services:**
142142
```bash
143-
docker-compose -f compose-dev.yaml up
143+
docker-compose -f compose.dev.yaml up
144144
```

0 commit comments

Comments
 (0)