Lost of uploaded files
Hi, i'm installaing the new versione of loomio using docker containers and it's really good but i have some issue each time i restart the docker i lose updated avatar and image file ( i found this issue https://github.com/loomio/loomio-deploy/issues/5 i have the some problem ) , what can i do?
i have now , after a docker-compose pull lost all the update files . why ?
thank for your help
Edo
loomio_1 | ActionController::RoutingError (No route matches [GET] "/system/users/uploaded_avatars/000/000/026/large/121212.jpg"):
loomio_1 | actionpack (4.2.5.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call'call'
loomio_1 | newrelic_rpm (3.12.0.288) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in
loomio_1 | actionpack (4.2.5.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in call'call'
loomio_1 | newrelic_rpm (3.12.0.288) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in
loomio_1 | railties (4.2.5.2) lib/rails/rack/logger.rb:38:in call_app'block in call'
loomio_1 | railties (4.2.5.2) lib/rails/rack/logger.rb:20:in
Sounds like you haven't defined the storage volume(s) correctly. Show us what you have in your composer file.
Regards
Andrew
docker-compose
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certificates:/etc/nginx/certs:rw
volumes_from:
- nginx
nginx:
image: jwilder/nginx-proxy
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certificates:/etc/nginx/certs:ro
- ./nginx/vhost.d:/etc/nginx/vhost.d
- ./nginx/html:/usr/share/nginx/html
ports:
- 80:80
- 443:443
links:
- loomio
- faye
loomio:
image: loomio/loomio
expose:
- 3000
env_file: ./env
links:
- db
environment:
- DATABASE_URL=postgresql://postgres:@db/loomio_production
volumes:
- ./attachments:/loomio/public/system/attachments
worker:
image: loomio/loomio
env_file: ./env
links:
- db:db
environment:
- DATABASE_URL=postgresql://postgres:@db/loomio_production
volumes:
- ./attachments:/loomio/public/system/attachments
command: "bundle exec rake jobs:work"
db:
image: postgres
volumes:
- ./pgdata:/pgdata
environment:
- POSTGRES_PASSWORD=
- PGDATA=/pgdata
mailin:
image: loomio/mailin-docker
ports:
- 25:25
links:
- loomio
environment:
- WEBHOOK_URL=http://loomio:3000/email_processor/
faye:
build: faye/.
env_file: ./faye_env
i see in the loomio container config a volume for attachment that in the system isnt mounted. and its the default config i havent changed
Hi
Did you try the solution proposed by @josephk in https://github.com/loomio/loomio-deploy/issues/5 ?
Side topic: it is not so clear to me if bugs should be reported on GitHub as well or discussed on loomio.org only. Maybe @robertguthrie and/or @jameskiesel could clarify. And an automatic sync between GitHub issues and Loomio threads could be a new feature as well.
The answer is that we accept and respond to feedback on both platforms, but tend to prefer feature discussion on Loomio and specific bug reports on github. The line is fuzzy and we are working to clarify it.
I'm interested in github / Loomio sync, but probably only if we get some more code-based communities interested in and using Loomio (I think software projects are a great use case for this tool.)
i tryed to change the Volume as suggested in the github issue and seem to work i update my avatr again and made a docker-compose down and up -d and the avatar seem to be already in place..... tomorrow i will do some more test i let you know :D
root@a5dea724b52a:/loomio# df -h
Filesystem Size Used Avail Use% Mounted on
none 59G 6.0G 50G 11% /
tmpfs 2.0G 0 2.0G 0% /dev
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/vda1 59G 6.0G 50G 11% /etc/hosts
shm 64M 0 64M 0% /dev/shm
root@a5dea724b52a:/loomio# ls -al public/
total 80
drwxr-xr-x 5 root root 4096 Jun 14 21:38 .
drwxr-xr-x 25 root root 4096 Jun 14 21:38 ..
-rw-r--r-- 1 root root 1964 Jun 14 21:18 404.html
-rw-r--r-- 1 root root 1962 Jun 14 21:18 422.html
-rw-r--r-- 1 root root 1971 Jun 14 21:18 429.html
-rw-r--r-- 1 root root 1988 Jun 14 21:18 500.html
drwxr-xr-x 10 root root 36864 Jun 14 21:39 assets
drwxr-xr-x 5 root root 4096 Jun 14 21:37 client
-rw-r--r-- 1 root root 1150 Jun 14 21:18 favicon.ico
-rw-r--r-- 1 root root 53 Jun 14 21:18 google2d27e29427405bf7.html
drwxr-xr-x 3 root root 4096 Jun 14 21:18 img
-rw-r--r-- 1 root root 134 Jun 14 21:18 service-worker.js