Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMPPIR-CheckIn_API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMPPIR
SMPPIR-CheckIn_API
Commits
68d25665
Commit
68d25665
authored
7 years ago
by
Henrique Varella Ehrenfried
Browse files
Options
Downloads
Patches
Plain Diff
Change default port
parent
2c0b78f9
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Dockerfile
+11
-0
11 additions, 0 deletions
Dockerfile
README.md
+27
-1
27 additions, 1 deletion
README.md
enviroment.js
+1
-1
1 addition, 1 deletion
enviroment.js
server/config.json
+1
-1
1 addition, 1 deletion
server/config.json
server/datasources.json.homologa
+18
-0
18 additions, 0 deletions
server/datasources.json.homologa
with
58 additions
and
3 deletions
Dockerfile
0 → 100644
+
11
−
0
View file @
68d25665
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
This diff is collapsed.
Click to expand it.
README.md
+
27
−
1
View file @
68d25665
...
...
@@ -72,3 +72,29 @@ The result will be something similar to:
"category_name"
:
"Categoria teste"
,
"category_description"
:
"Categoria usada para testar funcionalidades"
}
```
## 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
This diff is collapsed.
Click to expand it.
enviroment.js
+
1
−
1
View file @
68d25665
const
URL
=
'
http://localhost:
3
00
0
/api/
'
;
const
URL
=
'
http://localhost:
4
00
1
/api/
'
;
const
randomLowerCase
=
function
()
{
let
possible
=
'
abcdefghijklmnopqrstuvwxyz
'
;
...
...
This diff is collapsed.
Click to expand it.
server/config.json
+
1
−
1
View file @
68d25665
{
"restApiRoot"
:
"/api"
,
"host"
:
"0.0.0.0"
,
"port"
:
3
00
0
,
"port"
:
4
00
1
,
"remoting"
:
{
"context"
:
false
,
"rest"
:
{
...
...
This diff is collapsed.
Click to expand it.
server/datasources.json.homologa
0 → 100644
+
18
−
0
View file @
68d25665
{
"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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment