Conversation
|
Voted up |
janas-adam
left a comment
There was a problem hiding this comment.
guys, confirm if pr is still active
thanks
also conflicts should be resolved
| WORKDIR /tmp | ||
| ADD pyproject.toml . | ||
| ADD poetry.lock . | ||
| RUN poetry install --no-root |
There was a problem hiding this comment.
we can remove ENV POETRY_VIRTUALENVS_CREATE false
and simply do:
...
RUN poetry config virtualenvs.create false
RUN poetry install --no-root
also we can add ENV PYTHONUNBUFFERED 1
| ENV POETRY_VIRTUALENVS_CREATE false | ||
| WORKDIR /tmp | ||
| ADD pyproject.toml . | ||
| ADD poetry.lock . |
There was a problem hiding this comment.
simple oneline copy is sufficient (adds not needed)
COPY pyproject.toml poetry.lock ./
| @@ -0,0 +1,2 @@ | |||
| DATABASE_URL=mysql://admin:admin@db:3306/fastapi-admin | |||
| REDIS_URL=redis://redis:6379/0 | |||
There was a problem hiding this comment.
imo this file is not needed (look its ignored in gitignore)
i would create .sample.env file with given default values 🤔
| ## Run examples in local | ||
|
|
||
| 1. Clone repo. | ||
| 2. Create `.env` file. |
There was a problem hiding this comment.
then in readme we just inform
2. Copy sample env file and set your own environment variables
cp .sample.env .env
| ports: | ||
| - 8000:8000 | ||
|
|
||
| db: |
There was a problem hiding this comment.
in db instead of environment section:
env_file: ./.env
suggestion:
i am wondering about creating additional docker-compose.dev.yaml file with db/redis service configuration 🤔
Updated configuration allows:
fastapi-adminand example sources as volume (no image rebuild on src changes)