소스 검색

update docker doploy script and image rating update on default images

Kylie Jo Swistak 4 년 전
부모
커밋
0de96b3fc9
2개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  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