Giter VIP home page Giter VIP logo

pyb4430 / full-stack-fastapi-postgresql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tiangolo/full-stack-fastapi-template

126.0 126.0 32.0 701 KB

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.

License: MIT License

Shell 6.00% Python 36.78% Mako 0.31% HTML 10.19% Dockerfile 1.77% JavaScript 1.25% Vue 27.29% TypeScript 16.42%

full-stack-fastapi-postgresql's People

Contributors

abhisheksms avatar airibarne avatar ashears avatar br3ndonland avatar daniel-butler avatar dmontagu avatar ebreton avatar gucharbon avatar jcaguirre89 avatar mocsar avatar mpclarkson avatar nonameentered avatar pyb4430 avatar rcheese avatar rlonka avatar stephenbrown2 avatar tiangolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

full-stack-fastapi-postgresql's Issues

Traefik error with docker-compose

Thank you so much for maintaining this cookiecutter repo! I am currently trying it out to see if it will work for a project, and was hoping to get it set up in local development only. However, it seems like docker-compose wants me to have a load balancer set up on my development machine, which I really do not want to do. Any ideas how I can proceed? I'm happy to do some development work and commit it back to the community, if that's what it takes.

For reference: the error that I'm getting is

ERROR: Invalid interpolation format for "proxy" option in service "services": "${TRAEFIK_PUBLIC_NETWORK?Variable not set}"

docker compose up -d fail

Hello, can't build the container, when lunching docker compose up -d, this error accure:

=> CACHED [apiv6frontend:latest stage-1 1/4] FROM docker.io/library/nginx:1.22@sha256:809f0924101d9c07322d69ab0705e1a0d85b1d0f287e320ae19b0826979c56e9                  0.0s
 => CACHED [apiv6frontend:latest build-stage 2/7] WORKDIR /app                                                                                                           0.0s
 => CACHED [apiv6frontend:latest build-stage 3/7] COPY package*.json /app/                                                                                               0.0s
 => CANCELED [apiv6frontend:latest build-stage 4/7] RUN npm install                                                                                                      0.6s
 => [apiv6backend:latest internal] load build context                                                                                                                    0.0s
 => => transferring context: 93.62kB                                                                                                                                     0.0s
 => [apiv6celeryworker:latest internal] load build context                                                                                                               0.0s
 => => transferring context: 89.12kB                                                                                                                                     0.0s
 => CACHED [apiv6celeryworker:latest  1/11] FROM docker.io/library/python:3.10@sha256:daed8d46dfc607976178e2f2beb96f03f91240bcb553e0fffd8186b73929db9c                   0.0s
 => CACHED [apiv6celeryworker:latest  2/11] WORKDIR /app/                                                                                                                0.0s
 => CACHED [apiv6celeryworker:latest  3/11] RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python3                                            0.0s
 => ERROR [apiv6celeryworker:latest  4/11] RUN poetry config virtualenvs.create false                                                                                    0.4s
 => CANCELED [apiv6backend:latest  2/15] RUN pip install --no-cache-dir uvicorn[standard]==0.18.3                                                                        0.4s
------
 > [apiv6celeryworker:latest  4/11] RUN poetry config virtualenvs.create false:
#0 0.410 /bin/sh: 1: poetry: not found
------
failed to solve: executor failed running [/bin/sh -c poetry config virtualenvs.create false]: exit code: 127

By my little investigation I think the probleme is that the container don't have access to the internet on the build phase (Not sure if this is true)
I tried it on : Ubuntu 22.04, debian 11, AlmaLinux 9 always same error,
BUT work well on ubuntu 20.04.
docker -v Docker version 20.10.21, build baeda1f

Can't open url

All containers running, but I cannot open any website url of frontend or backend, help!
image
Below is my .env file, and I set the variable DOMAIN=localhost.

DOMAIN=localhost
# DOMAIN=local.dockertoolbox.tiangolo.com
# DOMAIN=localhost.tiangolo.com
# DOMAIN=dev.localhost

STACK_NAME=localhost

TRAEFIK_PUBLIC_NETWORK=traefik-public
TRAEFIK_TAG=localhost
TRAEFIK_PUBLIC_TAG=traefik-public

DOCKER_IMAGE_BACKEND=backend
DOCKER_IMAGE_CELERYWORKER=celeryworker
DOCKER_IMAGE_FRONTEND=frontend

# Backend
BACKEND_CORS_ORIGINS=["http://localhost", "http://localhost:4200", "http://localhost:3000", "http://localhost:8080", "https://localhost", "https://localhost:4200", "https://localhost:3000", "https://localhost:8080", "http://dev.localhost", "https://stag.localhost", "https://localhost", "http://local.dockertoolbox.tiangolo.com", "http://localhost.tiangolo.com"]
PROJECT_NAME=demo
SECRET_KEY=989e8dc41f7216c393b1830c5b36158992384adceab017ad18fb1fb3d0bc87a8
FIRST_SUPERUSER=[email protected]
FIRST_SUPERUSER_PASSWORD=123456
SMTP_TLS=True
SMTP_PORT=587
SMTP_HOST=qq
SMTP_USER=[email protected]
SMTP_PASSWORD=cxxxxxawhpifcj
EMAILS_FROM_EMAIL=[email protected]

USERS_OPEN_REGISTRATION=False

SENTRY_DSN=

# Flower
FLOWER_BASIC_AUTH=admin:123456

# Postgres
POSTGRES_SERVER=db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=123456
POSTGRES_DB=app

# PgAdmin
PGADMIN_LISTEN_PORT=5050
PGADMIN_DEFAULT_EMAIL=[email protected]
PGADMIN_DEFAULT_PASSWORD=123456

Legacy Travis CI build shield

In README.md there is a shield with the failing status of build for the original repository. Since it is not a short-time fork, I believe it is less confusing to remove the shield or setup Travis CI and its shield for this repository.

pgadmin error

I try to get started - but pgadmin don't start.
And the superuser don't work for the login?

pgadmin log:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/pgadmin4/pgadmin/__init__.py", line 372, in backup_db_file
    db_upgrade(app)
  File "/pgadmin4/pgadmin/setup/db_upgrade.py", line 25, in db_upgrade
    flask_migrate.upgrade(migration_folder)
  File "/venv/lib/python3.10/site-packages/flask_migrate/__init__.py", line 98, in wrapped
    f(*args, **kwargs)
  File "/venv/lib/python3.10/site-packages/flask_migrate/__init__.py", line 185, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "/venv/lib/python3.10/site-packages/alembic/command.py", line 322, in upgrade
    script.run_env()
  File "/venv/lib/python3.10/site-packages/alembic/script/base.py", line 569, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/venv/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 94, in load_python_file
    module = load_module_py(module_id, path)
  File "/venv/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 110, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/pgadmin4/pgadmin/setup/../../migrations/env.py", line 93, in <module>
    run_migrations_online()
  File "/pgadmin4/pgadmin/setup/../../migrations/env.py", line 86, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/venv/lib/python3.10/site-packages/alembic/runtime/environment.py", line 853, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/venv/lib/python3.10/site-packages/alembic/runtime/migration.py", line 623, in run_migrations
    step.migration_fn(**kw)
  File "/pgadmin4/migrations/versions/fdc58d9bd449_.py", line 43, in upgrade
    email, password = user_info()
  File "/pgadmin4/pgadmin/setup/user_info.py", line 75, in user_info
    email, p1 = user_info_server()
  File "/pgadmin4/pgadmin/setup/user_info.py", line 52, in user_info_server
    email = input(ENTER_EMAIL_ADDRESS)
EOFError: EOF when reading a line

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/venv/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
    super().init_process()
  File "/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/venv/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/pgadmin4/run_pgadmin.py", line 4, in <module>
    from pgAdmin4 import app
  File "/pgadmin4/pgAdmin4.py", line 93, in <module>
    app = create_app()
  File "/pgadmin4/pgadmin/__init__.py", line 410, in create_app
    upgrade_db()
  File "/pgadmin4/pgadmin/__init__.py", line 389, in upgrade_db
    backup_db_file()
  File "/pgadmin4/pgadmin/__init__.py", line 379, in backup_db_file
    raise RuntimeError('Migration failed')
RuntimeError: Migration failed
[2022-10-15 14:14:22 +0000] [86] [INFO] Worker exiting (pid: 86)
[2022-10-15 14:14:22 +0000] [1] [INFO] Shutting down: Master
[2022-10-15 14:14:22 +0000] [1] [INFO] Reason: Worker failed to boot.
Email address:

docker-compose up -d fails with error "executor failed running [/bin/sh -c npm run build]: exit code: 1"

When starting docker-compose up -d the following error occours:

#0 31.20    75:1   error  Delete `␍`  prettier/prettier
#0 31.20    76:21  error  Delete `␍`  prettier/prettier
#0 31.20    77:54  error  Delete `␍`  prettier/prettier
#0 31.20    78:23  error  Delete `␍`  prettier/prettier
#0 31.20    79:45  error  Delete `␍`  prettier/prettier
#0 31.20    80:38  error  Delete `␍`  prettier/prettier
#0 31.20    81:6   error  Delete `␍`  prettier/prettier
#0 31.20    82:4   error  Delete `␍`  prettier/prettier
#0 31.20    83:1   error  Delete `␍`  prettier/prettier
#0 31.20    84:20  error  Delete `␍`  prettier/prettier
#0 31.20    85:25  error  Delete `␍`  prettier/prettier
#0 31.20    86:4   error  Delete `␍`  prettier/prettier
#0 31.20    87:1   error  Delete `␍`  prettier/prettier
#0 31.20    88:28  error  Delete `␍`  prettier/prettier
#0 31.20    89:58  error  Delete `␍`  prettier/prettier
#0 31.20    90:20  error  Delete `␍`  prettier/prettier
#0 31.20    91:14  error  Delete `␍`  prettier/prettier
#0 31.20    92:6   error  Delete `␍`  prettier/prettier
#0 31.20    93:1   error  Delete `␍`  prettier/prettier
#0 31.20    94:51  error  Delete `�� ERROR  Error: Build failed with errors.
#0 31.21 Error: Build failed with errors.
#0 31.21     at /app/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
#0 31.21     at /app/node_modules/webpack/lib/webpack.js:148:8
#0 31.21     at /app/node_modules/webpack/lib/HookWebpackError.js:68:3
#0 31.21     at Hook.eval [as callAsync] (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
#0 31.21     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
#0 31.21     at Cache.shutdown (/app/node_modules/webpack/lib/Cache.js:150:23)
#0 31.21     at /app/node_modules/webpack/lib/Compiler.js:1225:15
#0 31.21     at Hook.eval [as callAsync] (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
#0 31.21     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
#0 31.21     at Compiler.close (/app/node_modules/webpack/lib/Compiler.js:1218:23)
#0 31.21     at /app/node_modules/webpack/lib/webpack.js:147:16
#0 31.21     at finalCallback (/app/node_modules/webpack/lib/Compiler.js:441:32)
#0 31.21     at /app/node_modules/webpack/lib/Compiler.js:458:13
#0 31.21     at Hook.eval [as callAsync] (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:33:1)
#0 31.21     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
#0 31.21     at onCompiled (/app/node_modules/webpack/lib/Compiler.js:456:21)
#0 31.21     at /app/node_modules/webpack/lib/Compiler.js:1196:17
#0 31.21     at eval (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
#0 31.21     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
------
failed to solve: executor failed running [/bin/sh -c npm run build]: exit code: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.