Commit 1febcc5ef947cc238ac59c6a10a0c345d6d492a3

Authored by jonathan.brilhante
1 parent 0103cb8f
Exists in master and in 1 other branch coppe

Atualização do compose para incluir o comando de inicialização do BD

compose/docker-compose.yml
@@ -23,10 +23,10 @@ services: @@ -23,10 +23,10 @@ services:
23 - "6379" 23 - "6379"
24 24
25 web: 25 web:
26 - build: ./web  
27 - command: bash -c "rails server -e production --port <PORT> --binding 0.0.0.0" 26 + image: vlibras/portal_container
  27 + command: bash -c "sleep 1m ; rake db:create db:setup ; rails server -e production --port 85 --binding 0.0.0.0"
28 ports: 28 ports:
29 - - "<PORT>:<PORT>" 29 + - "85:85"
30 links: 30 links:
31 - db 31 - db
32 - redis 32 - redis
@@ -34,8 +34,11 @@ services: @@ -34,8 +34,11 @@ services:
34 - db 34 - db
35 - redis 35 - redis
36 environment: 36 environment:
37 - - DOMAIN_NAME=<IP>:<PORT>  
38 - - VLIBRAS_API=<VIDEO-IP>:<VIDEO-PORTPORT>  
39 - - VLIBRAS_API_URL=http://<VIDEO-IP>:<VIDEO-PORTPORT>/api/ 37 + - DOMAIN_NAME=150.165.205.38:85
  38 + - VLIBRAS_API=150.165.205.38:80
  39 + - VLIBRAS_API_URL=http://150.165.205.38:80/api/
40 volumes: 40 volumes:
41 - web_data:/vlibraslportal/ 41 - web_data:/vlibraslportal/
  42 +volumes:
  43 + web_data:
  44 + db_data:
compose/docker-compose.yml.template 0 → 100755
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
  1 +
  2 +version: '2'
  3 +
  4 +#docker-compose run web rake db:create db:setup
  5 +
  6 +services:
  7 + db:
  8 + image: mysql:5.5
  9 + ports:
  10 + - "3306"
  11 + volumes:
  12 + - db_data:/var/lib/mysql
  13 + restart: always
  14 + environment:
  15 + MYSQL_ROOT_PASSWORD: vlibras
  16 + MYSQL_DATABASE: vlibrasvideo
  17 + MYSQL_USER: vlibrasuser
  18 + MYSQL_PASSWORD: vlibraspassword
  19 +
  20 + redis:
  21 + image: redis
  22 + ports:
  23 + - "6379"
  24 +
  25 + web:
  26 + image: vlibras/portal_container
  27 + command: bash -c "sleep 1m ; rake db:create db:setup ; rails server -e production --port <PORT> --binding 0.0.0.0"
  28 + ports:
  29 + - "<PORT>:<PORT>"
  30 + links:
  31 + - db
  32 + - redis
  33 + depends_on:
  34 + - db
  35 + - redis
  36 + environment:
  37 + - DOMAIN_NAME=<IP>:<PORT>
  38 + - VLIBRAS_API=<VIDEO-IP>:<VIDEO-PORT>
  39 + - VLIBRAS_API_URL=http://<VIDEO-IP>:<VIDEO-PORT>/api/
  40 + volumes:
  41 + - web_data:/vlibraslportal/
  42 +volumes:
  43 + db_data:
  44 + web_data: