-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from mbsantiago/feat/development-docker-compose
Feat/development docker compose
- Loading branch information
Showing
8 changed files
with
248 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim | ||
|
||
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 | ||
|
||
ADD . /code | ||
|
||
RUN mkdir /audio | ||
RUN mkdir /data | ||
|
||
VOLUME ["/data"] | ||
|
||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv sync --frozen --no-dev | ||
|
||
ENV WHOMBAT_AUDIO_DIR /audio | ||
ENV WHOMBAT_HOST="0.0.0.0" | ||
ENV WHOMBAT_DOMAIN="localhost" | ||
ENV WHOMBAT_DB_URL="sqlite+aiosqlite:////data/whombat.db" | ||
ENV PATH="/code/.venv/bin:$PATH" | ||
|
||
# Run the command to start the web server | ||
CMD ["whombat"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Our Standards | ||
|
||
At Whombat, we emphasize code quality and employ various tools to streamline development. | ||
|
||
### Code Formatting | ||
|
||
We follow the black style for Python to maintain consistent formatting throughout the project. | ||
Additionally, we use isort to organize imports neatly. | ||
For the Typescript project, prettier serves as the primary code formatter. | ||
|
||
### Linting | ||
|
||
We utilize the following tools for linting and error checking: | ||
|
||
1. Python: | ||
|
||
- **Ruff** for fast overall error checking | ||
- **Pyright** for type checking | ||
|
||
2. Typescript: | ||
- **Eslint** for linting | ||
- **Tsc** for checking Typescript code | ||
|
||
### Documentation | ||
|
||
We adhere to the Numpy docstring format for documenting Python code. | ||
Our documentation is built using mkdocs, providing a clear and organized structure for users and contributors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
services: | ||
backend: | ||
build: | ||
context: back | ||
container_name: whombat-backend | ||
command: ["uv", "run", "whombat"] | ||
environment: | ||
- WHOMBAT_DEV=true | ||
- WHOMBAT_DATA_DIR=/data/ | ||
- WHOMBAT_DB_URL=sqlite+aiosqlite:////data/whombat.db | ||
networks: | ||
- public | ||
volumes: | ||
- type: volume | ||
source: db-data | ||
target: /data | ||
- type: bind | ||
source: example_data/audio | ||
target: /audio | ||
ports: | ||
- 5000:5000 | ||
develop: | ||
watch: | ||
- action: sync | ||
path: back/src | ||
target: /code/src | ||
frontend: | ||
build: | ||
context: front | ||
args: | ||
- NODE_ENV=development | ||
container_name: whombat-frontend | ||
command: ["npm", "run", "dev"] | ||
depends_on: | ||
- backend | ||
networks: | ||
- public | ||
ports: | ||
- 3000:3000 | ||
develop: | ||
watch: | ||
- action: sync | ||
path: front | ||
target: /code | ||
storybook: | ||
build: | ||
context: front | ||
args: | ||
- NODE_ENV=development | ||
container_name: whombat-storybook | ||
command: ["npm", "run", "storybook"] | ||
ports: | ||
- 6006:6006 | ||
develop: | ||
watch: | ||
- action: sync | ||
path: front | ||
target: /code | ||
docs: | ||
build: | ||
context: back | ||
container_name: whombat-docs | ||
ports: | ||
- 8000:8000 | ||
command: ["uv", "run", "mkdocs", "serve", "-a", "0.0.0.0:8000"] | ||
develop: | ||
watch: | ||
- action: sync | ||
path: back/docs | ||
target: /code/docs | ||
- action: sync | ||
path: back/mkdocs.yml | ||
target: /code/mkdocs.yml | ||
|
||
networks: | ||
public: | ||
volumes: | ||
db-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM node:lts | ||
|
||
ENV CI=true | ||
ENV PORT=3000 | ||
|
||
WORKDIR /code | ||
|
||
COPY package.json /code/package.json | ||
|
||
COPY package-lock.json /code/package-lock.json | ||
|
||
RUN npm ci | ||
|
||
COPY . /code | ||
|
||
CMD [ "npm", "run", "dev" ] |