Skip to content

Commit

Permalink
Docker周りを少し修正
Browse files Browse the repository at this point in the history
  • Loading branch information
omiend committed Oct 1, 2017
1 parent 5e1a8f4 commit b29ecd9
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
/yarn-error.log

.byebug_history
docker/s3/.minio.sys/buckets/employees
docker/s3/.minio.sys/tmp
6 changes: 2 additions & 4 deletions spring.sh → docker/exec.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash
#!/bin/zsh

#################################
### 実行方法
### $ ./spring.sh rake db:migrate
#################################

cd ./docker

echo $1 $2 $3 $4 $5 $6 $7 $8 $9

docker exec creators_spring $1 $2 $3 $4 $5 $6 $7 $8 $9
docker exec employees_app $1 $2 $3 $4 $5 $6 $7 $8 $9
6 changes: 2 additions & 4 deletions restart.sh → docker/restart.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash
#!/bin/zsh

# 時々プロセスが残ってしまうことがあるので念のため削除
rm ./tmp/pids/server.pid
rm ../tmp/pids/server.pid

#################################
### 実行方法
### $ ./start.sh
#################################

cd ./docker

docker-compose stop

docker-compose up
1 change: 1 addition & 0 deletions docker/s3/.minio.sys/buckets/employees/policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"2012-10-17","Statement":[{"Action":["s3:GetBucketLocation","s3:ListBucketMultipartUploads"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::employees"],"Sid":""},{"Action":["s3:ListBucket"],"Condition":{"StringEquals":{"s3:prefix":["*"]}},"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::employees"],"Sid":""},{"Action":["s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject","s3:ListMultipartUploadParts","s3:PutObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::employees/**"],"Sid":""}]}
10 changes: 10 additions & 0 deletions docker/s3/.minio.sys/exec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/zsh

#################################
### 実行方法
### $ ./spring.sh rake db:migrate
#################################

echo $1 $2 $3 $4 $5 $6 $7 $8 $9

docker exec craftors_app $1 $2 $3 $4 $5 $6 $7 $8 $9
13 changes: 13 additions & 0 deletions docker/s3/.minio.sys/restart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/zsh

# 時々プロセスが残ってしまうことがあるので念のため削除
rm ../tmp/pids/server.pid

#################################
### 実行方法
### $ ./start.sh
#################################

docker-compose stop

docker-compose up
6 changes: 2 additions & 4 deletions start.sh → docker/start.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash
#!/bin/zsh

# 時々プロセスが残ってしまうことがあるので念のため削除
rm ./tmp/pids/server.pid
rm ../tmp/pids/server.pid

#################################
### 実行方法
### $ ./start.sh
#################################

cd ./docker

docker-compose up
6 changes: 2 additions & 4 deletions stop.sh → docker/stop.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash
#!/bin/zsh

# 時々プロセスが残ってしまうことがあるので念のため削除
rm ./tmp/pids/server.pid
rm ../tmp/pids/server.pid

#################################
### 実行方法
### $ ./start.sh
#################################

cd ./docker

docker-compose stop

0 comments on commit b29ecd9

Please sign in to comment.