The logs weren't being sent because we were missing the load_dotenv call that picks up the environment variable for logtail config. After adding that, it seems to work. On dev machines, this problem likely did not occur because the env variables were set by other means.
Persistence
For file + db persistence, I restructured docker volume configuration so that:
there is a volume for assets. Uploaded files will appear here on the host machine, and in /app/SIMS_Portal/static/assets within the docker container
I placed this, and also the db volume, outside of the main code structure. This is to prevent them being overwritten on rebuilding the docker container
I've updated SQLALCHEMY_DATABASE_URI in dotenv
How I've tested:
docker-compose up --build web
open browser to http://172.20.0.2:5000 (it wasn't visible on 127.0.0.1:5001 -- but since you didn't mention that as a problem, I'm assuming the configuration is working fine for you)
login, change profile avatar and upload new badge
confirm files are show in the site, and visible in the fs both in docker and on the host
restart the docker container, confirm files are still there and db changes are reflected
Logtail Configuration
The logs weren't being sent because we were missing the
load_dotenv
call that picks up the environment variable for logtail config. After adding that, it seems to work. On dev machines, this problem likely did not occur because the env variables were set by other means.Persistence
For file + db persistence, I restructured docker volume configuration so that:
assets
. Uploaded files will appear here on the host machine, and in /app/SIMS_Portal/static/assets within the docker containerHow I've tested:
docker-compose up --build web
http://172.20.0.2:5000
(it wasn't visible on 127.0.0.1:5001 -- but since you didn't mention that as a problem, I'm assuming the configuration is working fine for you)