Skip to content

Commit 77b3e9c

Browse files
committed
initial folders, one for current version of template and another for new with fastapi-users
1 parent 949dd71 commit 77b3e9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3150
-498
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-20.04
1010
strategy:
1111
matrix:
12-
python-version: [3.7, 3.8, 3.9]
12+
python-version: [3.9]
1313

1414
services:
1515
postgres:

{{cookiecutter.project_name}}/nginx-unit-config.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

{{cookiecutter.project_name}}/.env.example renamed to {{cookiecutter.project_name}}/template_fastapi_users/.env.example

File renamed without changes.

{{cookiecutter.project_name}}/.env.template renamed to {{cookiecutter.project_name}}/template_fastapi_users/.env.template

File renamed without changes.

{{cookiecutter.project_name}}/.flake8 renamed to {{cookiecutter.project_name}}/template_fastapi_users/.flake8

File renamed without changes.

{{cookiecutter.project_name}}/.gitignore renamed to {{cookiecutter.project_name}}/template_fastapi_users/.gitignore

File renamed without changes.

{{cookiecutter.project_name}}/Dockerfile renamed to {{cookiecutter.project_name}}/template_fastapi_users/Dockerfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# See https://unit.nginx.org/installation/#docker-images
22

3-
FROM nginx/unit:1.25.0-python3.9
3+
FROM nginx/unit:1.26.1-python3.9
44

55
ENV PYTHONUNBUFFERED 1
66

7-
# Nginx unit config and init.sh will be consumed at container startup.
8-
COPY ./app/init.sh /docker-entrypoint.d/init.sh
9-
COPY ./nginx-unit-config.json /docker-entrypoint.d/config.json
10-
RUN chmod +x /docker-entrypoint.d/init.sh
7+
RUN apt update && apt install -y python3-pip
118

129
# Build folder for our app, only stuff that matters copied.
1310
RUN mkdir build
1411
WORKDIR /build
1512

16-
COPY ./app ./app
17-
COPY ./alembic ./alembic
18-
COPY ./alembic.ini .
13+
# Update, install requirements and then cleanup.
1914
COPY ./requirements.txt .
2015

21-
# Update, install requirements and then cleanup.
22-
RUN apt update && apt install -y python3-pip \
23-
&& pip3 install -r requirements.txt \
16+
RUN pip3 install -r requirements.txt \
2417
&& apt remove -y python3-pip \
2518
&& apt autoremove --purge -y \
26-
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/*.list
19+
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/*.list
20+
21+
# Copy the rest of app
22+
COPY ./app ./app
23+
COPY ./alembic ./alembic
24+
COPY ./alembic.ini .
25+
26+
# Nginx unit config and init.sh will be consumed at container startup.
27+
COPY ./app/init.sh /docker-entrypoint.d/init.sh
28+
COPY ./nginx-unit-config.json /docker-entrypoint.d/config.json
29+
RUN chmod a+x /docker-entrypoint.d/init.sh

{{cookiecutter.project_name}}/alembic.ini renamed to {{cookiecutter.project_name}}/template_fastapi_users/alembic.ini

File renamed without changes.

{{cookiecutter.project_name}}/alembic/README renamed to {{cookiecutter.project_name}}/template_fastapi_users/alembic/README

File renamed without changes.

{{cookiecutter.project_name}}/alembic/env.py renamed to {{cookiecutter.project_name}}/template_fastapi_users/alembic/env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from sqlalchemy.ext.asyncio import AsyncEngine
66
from asyncio import get_event_loop
77

8-
from app.core.config import settings
8+
from app.core import config as app_config
99
from alembic import context
1010

1111
# this is the Alembic Config object, which provides
@@ -31,7 +31,7 @@
3131

3232

3333
def get_database_uri():
34-
return settings.DEFAULT_SQLALCHEMY_DATABASE_URI
34+
return app_config.settings.DEFAULT_SQLALCHEMY_DATABASE_URI
3535

3636

3737
def run_migrations_offline():

0 commit comments

Comments
 (0)