Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • I idcare-wiki
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Id-Care
  • idcare-wiki
  • Wiki
  • configuracao

Last edited by Henrique Reis Kops Jun 29, 2021
Page history

configuracao

Página Inicial

Página de Configuração do Projeto

Aqui deve ser explicado como configurar o Ambiente para que os Desenvolvedores do Projeto possam configurar o projeto para rodar em seus computadores, deve ser sempre atualizado a cada mudança de instalação feita.

  • Deve ser explicado a configuração de TODAS as partes do projeto, tanto BACK,BANCO,FRONT,etc...
  • Além de explicar aqui, deve ter em cada Repositório o RESUMO de como instalar para quando os Desenvolvedores baixarem o projeto possam configurar por lá também

Front-End

Para configurar o ambiente do Front, é necessário instalar Flutter, Dart, Android Studio (ou VSCode) e os respectivos plugins.

  1. Para instalar Flutter, basta abrir esse hiperlink, selecionar seu sistema operacional e seguir os passos. Ao instalar o Flutter, já se está automaticamente instalando o Dart;
  2. Após isso, é necessário instalar o Android Studio ou o Visual Studio Code;
  3. Após a instalação da IDE, procurar nos plugins da IDE a extensão "Flutter" e a instalar (ele já instala junto a extensão do Dart). Dessa forma, a IDE pode reconhecer que o Flutter está instalado na máquina e gerar/abrir projetos Flutter;
    3.1. Para ver como instalar plugins no Android Studio, basta seguir este link;
    3.2. Para instalar plugins no VSCode, basta seguir este link;
  4. Depois disso tudo, é necessário criar um simulador. Os paços para criar podem ser seguidos aqui.

Configuração NGINX

server {
    listen       80;

    server_name  localhost;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    location ~* /volunteer* {
        add_header 'Access-Control-Allow-Origin' "$http_origin" always;
        add_header 'Access-Control-Allow-Credentials' 'true' always;
        add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
        add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE' always;
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Credentials' 'true' always;
            add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
            add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE' always;
            add_header 'Access-Control-Allow-Origin' "$http_origin" always;
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }
        proxy_pass http://volunteer-ms:8080;
    }

    location ~* /institution* {
        add_header 'Access-Control-Allow-Origin' "$http_origin" always;
        add_header 'Access-Control-Allow-Credentials' 'true' always;
        add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
        add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE' always;
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Credentials' 'true' always;
            add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
            add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE' always;
            add_header 'Access-Control-Allow-Origin' "$http_origin" always;
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }

        proxy_pass http://institution-ms:8080;
    }

    location ~* /opportunit* {
        add_header 'Access-Control-Allow-Origin' "$http_origin" always;
        add_header 'Access-Control-Allow-Credentials' 'true' always;
        add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
        add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE' always;
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Credentials' 'true' always;
            add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
            add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE' always;
            add_header 'Access-Control-Allow-Origin' "$http_origin" always;
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }

        proxy_pass http://opportunity-ms:8080;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

Config GitLab Runner

yum update
amazon-linux-extras install docker
yum install docker -y
service docker start
usermod -a -G docker ec2-user
docker run -d --name gitlab-runner --restart always \
     -v /srv/gitlab-runner/config:/etc/gitlab-runner \
     -v /var/run/docker.sock:/var/run/docker.sock \
     gitlab/gitlab-runner:latest
docker run --rm -it -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register \
	--non-interactive --url https://tools.ages.pucrs.br/ \
	--registration-token V6HHZWKRQBLExxTPBME7 --name id-care-runner \
	--locked --paused --executor docker --docker-image docker:dind
cat > /srv/gitlab-runner/config/config.toml << EOF
concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "id-care-runner"
  url = "https://tools.ages.pucrs.br"
  token = "7Hu-XErZW6f1W_zt21kg"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "docker:dind"
    privileged = true 
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache", "/var/run/docker.sock:/var/run/docker.sock"]
    shm_size = 0
EOF
Clone repository
  • Gerência de Projetos
  • Horários
  • Utilizando a wiki
    • adicionando imagens
    • escrevendo em markdown
    • wiki no editor de texto
  • arquitetura
  • banco_dados
  • configuracao
  • estudos_dirigidos
  • Home
  • instalacao
  • mockups
  • requisitos
  • sprints