Explorar el Código

update docker doploy script and image rating update on default images

Kylie Jo Swistak hace 5 años
padre
commit
0de96b3fc9
Se han modificado 2 ficheros con 8 adiciones y 5 borrados
  1. 1 1
      app/controllers/image_controller.rb
  2. 7 4
      deploy/deploy.sh

+ 1 - 1
app/controllers/image_controller.rb

@@ -8,7 +8,7 @@ class ImageController
     end
 
     if image
-      image.update(url: url)
+      image.update(url: url, category: rating)
     else
       CharImage.create(
         char_id: char_id,

+ 7 - 4
deploy/deploy.sh

@@ -3,7 +3,10 @@
 cd $HOME/rotom_bot
 git pull
 
-docker build . -t rotom_bot:latest
-docker stop rotom_bot
-docker run --env-file .env --name rotom_bot --rm -d rotom_bot:latest
-docker image prune -f
+docker-compose build
+docker-compose down
+docker-compose up
+#docker build . -t rotom_bot:latest
+#docker stop rotom_bot
+#docker run --env-file .env --name rotom_bot --rm -d rotom_bot:latest
+#docker image prune -f