fastapi / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.
MIT License
27.56k stars 4.91k forks source link

Project Broken Due To Docker / Docker Compose - Unsupported Compose File Version - Root Additional Property Name Is Not Allowed #486

Open akamspsw opened 2 years ago

akamspsw commented 2 years ago

This project does not work anymore.

With a clean cookiecutter, if you follow the directions in dockerswarm.rocks you get the error: "Unsupported compose file version 1.0"

This happens when you get to docker stack in /scripts/deploy.sh

I think it's because docker stack and docker compose are not compatible.

If you try to add a version to the top of the file after the compose config, i.e. ...

(echo -e "version: '3.8'\n"; DOMAIN=${DOMAIN?Variable not set} \
TRAEFIK_TAG=${TRAEFIK_TAG?Variable not set} \
STACK_NAME=${STACK_NAME?Variable not set} \
TAG=${TAG?Variable not set} \
docker-compose \
-f docker-compose.yml \
config)

... then you still get this error "(root) additional property **name** is not allowed"

akamspsw commented 2 years ago

This is because tiangolo updated docker-with-compose image on 2022-11-10 with breaking changes to this project.

update .gitlab-ci.yml will fix....

tiangolo/docker-with-compose:2021-09-18

tiangolo commented 2 years ago

Yep, there's a lot of things I have to update here, starting with migrating to SQLModel. But first I have to finish dinner things in SQLModel. 🤓

SobieskiCodes commented 1 year ago

Yep, there's a lot of things I have to update here, starting with migrating to SQLModel. But first I have to finish dinner things in SQLModel. 🤓

Glad to hear there are plans on the board to update this, I appreciate the project - thank you. I've been working on a project structure loosely based on your project for the last month or so. Do you have any major adjustments for the front end in mind at this stage, or is that loosely going to stay intact?