Skip to content
Snippets Groups Projects
Commit 68d25665 authored by Henrique Varella Ehrenfried's avatar Henrique Varella Ehrenfried :speech_balloon:
Browse files

Change default port

parent 2c0b78f9
No related branches found
No related tags found
No related merge requests found
FROM node:latest
RUN apt-get -y update -qq && apt-get install -y -qq apt-utils tree
COPY . .
RUN npm install
EXPOSE 4001
CMD npm start
\ No newline at end of file
......@@ -71,4 +71,30 @@ The result will be something similar to:
{
"category_name": "Categoria teste",
"category_description": "Categoria usada para testar funcionalidades"
}
\ No newline at end of file
}
```
## Deploy on SMPPIRHOMOLOGA
Whenever you are ready to deploy, please change the `datasources.json` with the `datasources.json.homologa`.
After that, you can use the Docker image:
Para criar a imagem nova
`sudo docker build --tag mapping-api .`
Para exportar a imagem
`sudo docker save -o ~/mapping-api.tar mapping-api`
Para importar a image
`sudo docker load -i ~/mapping-api.tar `
Para rodar a imagem
`sudo docker run -d --rm -p 4001:4001 --net="host" --name mapping-api mapping-api`
:warning: O `-d` significa daemon, não quiser que o comando de rodar imagem rode em segundo plano, remova este argumento :warning:
\ No newline at end of file
const URL = 'http://localhost:3000/api/';
const URL = 'http://localhost:4001/api/';
const randomLowerCase = function() {
let possible = 'abcdefghijklmnopqrstuvwxyz';
......
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"port": 4001,
"remoting": {
"context": false,
"rest": {
......
{
"db": {
"name": "db",
"connector": "memory"
},
"SMPPIR_CheckIn2": {
"host": "localhost",
"port": 5432,
"url": "postgres://smppir:123mudar@localhost:5432/smppir_checkin?ssl=false",
"database": "smppir_checkin",
"password": "123mudar",
"name": "SMPPIR_CheckIn2",
"connector": "postgresql",
"user": "postgres",
"ssl": false
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment