Comments (8)
I've commited a fix in master, but want to test whether the autoincrement ID needs to be reset on the database since it was being set manually in the download script (also, running the script will not work till the website is updated)
from docker.
Great! Closing here, if you encounter the problem again, just re-open
from docker.
That's interesting (and obviously a bug). It's also interesting that it clashes with an id when it should add a new one. Does the docker imagine have already exercise images?
from docker.
The docker image hasn't images, but, after using docker compose, I generate the images using the command
docker-compose exec web python3 manage.py download-exercise-images
docker-compose exec web wger load-online-fixtures
Without any error message.
I even tried to exec docker-compose exec web python3 manage.py migrate
, but it didn't solved the issue.
I used the docker-compose up -d, in a fresh install, using the following docker-compose.yml and prod.env below.
I just changed the port (from 80 to 58148), and volumes, but I think the problem is not related to that.
docker-compose.yml
version: '3.7'
services:
web:
image: wger/devel:latest
volumes:
- /home/username/wger/static:/home/wger/static
- /home/username/wger/media:/home/wger/media
ports:
- 8000
env_file:
- ./prod.env
depends_on:
- db
- cache
nginx:
build: ./nginx
volumes:
- /home/username/wger/static:/wger/static:ro
- /home/username/wger/media:/wger/media:ro
ports:
- 58148:80
depends_on:
- web
db:
image: postgres:12.0-alpine
volumes:
- /home/username/wger/postgres-data:/var/lib/postgresql/data/
expose:
- 5432
environment:
- POSTGRES_USER=wger
- POSTGRES_PASSWORD=wger
- POSTGRES_DB=wger
cache:
restart: always
image: redis:latest
expose:
- 6379
volumes:
postgres-data:
static:
media:
prod.env
# Database
DJANGO_DB_ENGINE=django.db.backends.postgresql
DJANGO_DB_DATABASE=wger
DJANGO_DB_USER=wger
DJANGO_DB_PASSWORD=wger
DJANGO_DB_HOST=db
DJANGO_DB_PORT=5432
# Cache
DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
DJANGO_CACHE_LOCATION=redis://cache:6379/1
DJANGO_CACHE_TIMEOUT= 1296000
# 60*60*24*15, 15 Days
DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
DJANGO_MEDIA_ROOT=/home/wger/media
# Change the secret key to a random string if you are running this instance publicly
SECRET_KEY=mysecretkey
# Application
ALLOW_REGISTRATION=True
ALLOW_GUEST_USERS=False
# Others
DJANGO_DEBUG=False
WGER_USE_GUNICORN=True
TIME_ZONE=Europe/Berlin
SITE_URL=http://localhost:8000
from docker.
Found the error, the exercise images were being identified by their ID, so if there were locally uploaded images they would clash when (or after) running download-exercise-images. I'll add a UUID as we do with the exercises so it's possible to properly reference them
from docker.
Ok, I will wait for the tests. Thank you! Really nice software.
from docker.
you might have to change the postgres sequence for the image IDs. For that, you will need to exec into the DB container and do something like this:
ALTER SEQUENCE exercises_exerciseimage_id_seq RESTART WITH 500;
I'm also not sure whether you need to to reload the exercise and exercise base fixtures, probably not. So, depending on how much data you have entered, it might be faster to drop the DB and pull a new version
(while I was looking into this, I refactored the image script, it should be way faster now)
from docker.
Thanks! I was just starting to add pictures, so I will drop the DP and pull the new version.
from docker.
Related Issues (20)
- Forbidden (403) CSRF verification failed. Request aborted. HOT 3
- CSFR-Verification HOT 1
- Cant get Wger to work properly ? Is it my configuration ? , permissions? … :( HOT 20
- Error 403 forbidden after login with default username and password HOT 3
- Verification emails use localhost instead of SITE_URL HOT 2
- Docker Compose Trouble - Server app - Permission Denied ./static/django_extensions HOT 2
- Exercises Not Syncing HOT 11
- "An error has occcured!" Produced on webgui HOT 27
- Workout - cannot add untranslated excercises HOT 1
- [Bug] Wger command "load-online-fictures" not working. HOT 1
- [Feature Request] All-In-One Docker Image HOT 1
- No exercises show up HOT 19
- Extend configuration
- Missing linux/amd64 in wger/server:latest? HOT 1
- Requires latest Ubuntu version? HOT 1
- watchtower breaks wger HOT 1
- Nginx error HOT 3
- Build the different architectures in parallel HOT 1
- Cache built python wheels HOT 1
- Fresh database migrations fail with: `relation "exercises_exercisebase" does not exist` HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.