... | @@ -16,4 +16,126 @@ Para configurar o ambiente do Front, é necessário instalar Flutter, Dart, Andr |
... | @@ -16,4 +16,126 @@ Para configurar o ambiente do Front, é necessário instalar Flutter, Dart, Andr |
|
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;<br>
|
|
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;<br>
|
|
3.1. Para ver como instalar plugins no Android Studio, basta seguir [este link](https://stackoverflow.com/questions/30617408/how-to-install-plugin-in-android-studio);<br>
|
|
3.1. Para ver como instalar plugins no Android Studio, basta seguir [este link](https://stackoverflow.com/questions/30617408/how-to-install-plugin-in-android-studio);<br>
|
|
3.2. Para instalar plugins no VSCode, basta seguir [este link](https://code.visualstudio.com/docs/editor/extension-marketplace);<br>
|
|
3.2. Para instalar plugins no VSCode, basta seguir [este link](https://code.visualstudio.com/docs/editor/extension-marketplace);<br>
|
|
4. Depois disso tudo, é necessário criar um simulador. Os paços para criar podem ser seguidos [aqui](https://developer.android.com/studio/run/managing-avds). |
|
4. Depois disso tudo, é necessário criar um simulador. Os paços para criar podem ser seguidos [aqui](https://developer.android.com/studio/run/managing-avds).
|
|
\ No newline at end of file |
|
|
|
|
|
|
|
|
|
## 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
|
|
|
|
``` |
|
|
|
\ No newline at end of file |