I want to use latest Strapi with SQLite database in Docker container.
From tutorial I got this
services: strapi: image: strapi/strapi volumes: - ./:/srv/app ports: - '1337:1337'
But when I run it with
docker-compose up creates all the files in same directory as
version: '3' services: strapi: image: strapi/strapi volumes: - ./tmp:/srv/app/.tmp - ./config:/srv/app/.config - ./public/uploads:/srv/app/public/uploads ports: - '1337:1337'
But then I started to get error.:
strapi_1 | Using strapi 3.6.8
strapi_1 | No project found at /srv/app. Creating a new strapi project
strapi_1 | You can only create a Strapi app in an empty directory.
strapi_1 | Make sure /srv/app is empty.
strapi_strapi_1 exited with code 1
How do I make it so that this error is fixed and docker-compose.yaml directory is not littered with with all those files? So that all files are inside docker and only SQLite database is persisted outside of docker to avoid it getting deleted with docker restart? Also it seems to be Strapi 3.6.8? But version 4 is out. Is there way to get version 4? Also do I still need Dockerfile if this docker-compose.yaml seems to make it all already?