upme-app / upmeapp

https://www.upmeapp.com.br
15 stars 9 forks source link

A UpMe! é uma plataforma que integra universidade e empresas conectando os assuntos de cada disciplina com projetos de mercado.

Nosso site: https://www.upmeapp.com.br

GETTING STARTED

DEPENDENCIES

SETUP

Local setup

Redis

Docker compose infrastructure setup

Requirements

Usage

Then, all steps of docker build will appear in your terminal

Now all migrations will be done

$ docker-compose run webapp rake db:create db:migrate
Starting upmeapp_db_1 ...
Starting upmeapp_db_1
Creating upmeapp_redis_1 ...
Creating upmeapp_redis_1 ... done
Database 'upmeapp_development' already exists
Database 'upmeapp_test' already exists
(...)
$ docker-compose up
Removing upmeapp_webapp_1
upmeapp_redis_1 is up-to-date
upmeapp_db_1 is up-to-date
Recreating 77afa1f38825_upmeapp_webapp_1 ...
Recreating 77afa1f38825_upmeapp_webapp_1 ... done
Attaching to upmeapp_redis_1, upmeapp_db_1, upmeapp_webapp_1
redis_1   | 1:C 23 Nov 07:24:02.929 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1   | 1:C 23 Nov 07:24:02.929 # Redis version=4.0.2, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1   | 1:C 23 Nov 07:24:02.929 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1   | 1:M 23 Nov 07:24:02.931 * Running mode=standalone, port=6379.
redis_1   | 1:M 23 Nov 07:24:02.931 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1   | 1:M 23 Nov 07:24:02.931 # Server initialized
redis_1   | 1:M 23 Nov 07:24:02.931 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1   | 1:M 23 Nov 07:24:02.931 * Ready to accept connections
db_1      | 2017-11-23 03:30:01.583 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1      | 2017-11-23 03:30:01.583 UTC [1] LOG:  listening on IPv6 address "::", port 5432
(...)

After that you'll be able to open the system in brower. By default, you should use localhost:3000, for use it in a different port, you should edit the docker-compose.yaml file, to change the it. If you change the redis port or postgres port in the docker-compose.yaml, is necessary change the config/database.yml and config/cable.yml to ensure that all configurations are matching.

Pure docker infrastructure setup

This environment could be used if you don't want use a compose environment. Is possible reproduce it in production, once you can push your project to the dockerhub, you will be able to use this image in a container orquestration system(e.g. kubernetes, docker swarm, etc...)

Requrements

Usage

Is important making clear that by default the image name is upmeapp and the default TAG version is v0.0.1, but you can change it using environment variables e.g export IMAGE_NAME=your_image_name You are able to change the IMAGE_NAME, IMAGE_TAG and the PORT, which is respectively the image name, the image version tag and the port which the application will run.

After push it, you can use this image in whatever computer having docker and the postgres/redis containers only pulling it. :)

Licença Creative Commons
O trabalho Upme de Amanda Busato está licenciado com uma Licença Creative Commons - Atribuição-NãoComercial-SemDerivações 4.0 Internacional.
Baseado no trabalho disponível em https://upmeapp.com.br/.
Podem estar disponíveis autorizações adicionais às concedidas no âmbito desta licença em https://upmeapp.com.br/.