-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from mia-ajuda/develop
update master
- Loading branch information
Showing
51 changed files
with
7,616 additions
and
1,079 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DATABASE_URL= | ||
NODE_ENV=[development|production] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"env": { | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"airbnb-base" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018 | ||
}, | ||
"rules": { | ||
"indent": ["error", 4], | ||
"no-underscore-dangle": 0, | ||
"no-param-reassign": 0, | ||
"max-len": ["error", { "code": 120 }], | ||
"no-useless-catch": 0, | ||
"class-methods-use-this": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
stages: | ||
- lint | ||
- build | ||
|
||
lint: | ||
stage: lint | ||
image: node:12.2.0-alpine | ||
before_script: | ||
- npm install | ||
script: | ||
- npx eslint ./src | ||
allow_failure: true | ||
|
||
build: | ||
services: | ||
- docker:dind | ||
image: docker:stable | ||
stage: build | ||
variables: | ||
IMAGE_NAME: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" | ||
before_script: | ||
- cat $FIREBASE_CONFIG > ./src/config/fibaseConfig.js | ||
script: | ||
- echo "Building image" | ||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY | ||
- docker build . -t $IMAGE_NAME | ||
- docker push $IMAGE_NAME | ||
- docker tag $IMAGE_NAME $CI_REGISTRY_IMAGE:latest | ||
- docker push $CI_REGISTRY_IMAGE:latest | ||
except: | ||
- master | ||
- configuracao-ci | ||
|
||
build stable: | ||
services: | ||
- docker:dind | ||
image: docker:stable | ||
stage: build | ||
variables: | ||
IMAGE_NAME: "$CI_REGISTRY_IMAGE:stable" | ||
before_script: | ||
- cat $FIREBASE_CONFIG > ./src/config/fibaseConfig.js | ||
script: | ||
- echo "Building image" | ||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY | ||
- docker build . -t $IMAGE_NAME | ||
- docker push $IMAGE_NAME | ||
only: | ||
- master | ||
- configuracao-ci | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
FROM node:12.2.0-alpine | ||
|
||
# Define o diretório de trabalho como /app | ||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
# Copia os arquivos locais para o container | ||
COPY ./ ./ | ||
# Instala as dependências do projeto | ||
RUN yarn install | ||
|
||
COPY ./ ./ | ||
COPY ./ ./ | ||
|
||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# Mia Ajuda - Backend | ||
|
||
<a href="https://2019-2-arquitetura-desenho.github.io/wiki/" target="_blank"><img src="https://img.shields.io/badge/Mia%20Ajuda-2020.1-purple"></a> | ||
|
||
Projeto criado e desenvolvido por professores e estudantes da Faculdade do Gama (FGA), da Universidade de Brasília, com o intuito de contribuir com a sociedade em um momento de necessidade que estamos vivendo em relação à CoVid-19. O aplicativo tem o propósito de ser uma ferramenta de incentivo a ações sociais de ajuda e colaboração entre pessoas de comunidades e vizinhanças. O Mia Ajuda serve como um meio de ligação entre pessoas necessitadas e voluntários que possam ajudar, seja de forma imaterial (entretenimento, companhia, amparo psicológico), como de forma material (comida, objetos, itens de higiene pessoal). | ||
<a href="https://mia-ajuda.github.io/Documentation/#/" target="_blank"><img src="https://img.shields.io/badge/Mia%20Ajuda-2020.1-purple"></a> | ||
|
||
## Rode com Docker | ||
|
||
Para executar localmente a aplicação, proceda com os seguintes passos: | ||
|
||
1. Instale o Docker [neste link](https://docs.docker.com/install/linux/docker-ce/ubuntu/). | ||
2. Instale o Docker Compose [neste link](https://docs.docker.com/compose/install/). | ||
3. Na pasta principal do projeto, construa e inicialize a aplicação com o comando: `sudo docker-compose -f docker-compose.yml up --build`. | ||
4. O backend estará disponível em: `http://localhost:8000/`. | ||
3. Pegue o arquivo firebaseConfig.js do drive na pasta firebase e coloque-o dentro da pasta config do projeto. | ||
4. Crie um arquivo .env e dentro dele crie 2 váriaveis de ambiente LATITUDE_ENV= e LONGITUDE_ENV= | ||
5. Coloque a latitude e longitude de sua casa nas variáveis de ambiente. | ||
6. Na pasta principal do projeto, construa e inicialize a aplicação com o comando: `sudo docker-compose -f docker-compose.yml up --build`. | ||
7. O backend estará disponível em: `http://localhost:8000/`. | ||
|
||
* Observação: por padrão, o docker-compose iniciará a API com `yarn start`. | ||
* Observação: por padrão, o docker-compose iniciará a API com `yarn start`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.