cor docker Dev/Prod
This commit is contained in:
parent
3ac3e9ac8e
commit
d15fa9a57d
|
|
@ -2,6 +2,7 @@ Dev :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose -f docker-compose-dev.yml build
|
docker-compose -f docker-compose-dev.yml build
|
||||||
|
docker-compose -f docker-compose-dev.yml up
|
||||||
docker-compose -f docker-compose-dev.yml up --scale agent=3
|
docker-compose -f docker-compose-dev.yml up --scale agent=3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
// Config Dev
|
||||||
|
console.log('## CONFIG DEV ##');
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
jucundus: {
|
||||||
|
url: 'http://host.docker.internal:3000',
|
||||||
|
useremail: 'agent@agent.com'
|
||||||
|
},
|
||||||
|
agent: {
|
||||||
|
urlApi: 'http://agent/internApi',
|
||||||
|
maxCloseWebsockets: 5,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = { config };
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
const config = {
|
|
||||||
jucundus: {
|
|
||||||
url: 'http://host.docker.internal:3000',
|
|
||||||
useremail: 'agent@agent.com'
|
|
||||||
},
|
|
||||||
agent: {
|
|
||||||
urlApi: 'http://agent/internApi',
|
|
||||||
maxCloseWebsockets: 5,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = { config };
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
// Config Prod
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
jucundus: {
|
jucundus: {
|
||||||
url: 'http://jucundus-api.saucisse.ninja',
|
url: 'https://jucundus-api.saucisse.ninja',
|
||||||
useremail: 'agent@agent.com'
|
useremail: 'agent@agent.com'
|
||||||
},
|
},
|
||||||
agent: {
|
agent: {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./agent:/agent
|
- ./agent:/agent
|
||||||
- ./.Key.js:/agent/.Key.js
|
- ./.Key.js:/agent/.Key.js
|
||||||
- ./config-dev.js:/agent/config.js
|
|
||||||
- ./AuctionServices:/agent/AuctionServices
|
- ./AuctionServices:/agent/AuctionServices
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
@ -24,7 +23,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./scrapper:/scrapper
|
- ./scrapper:/scrapper
|
||||||
- ./.Key.js:/scrapper/.Key.js
|
- ./.Key.js:/scrapper/.Key.js
|
||||||
- ./config-dev.js:/scrapper/config.js
|
|
||||||
- ./AuctionServices:/scrapper/AuctionServices
|
- ./AuctionServices:/scrapper/AuctionServices
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
|
||||||
|
|
@ -6,32 +6,31 @@ services:
|
||||||
context: ./agent
|
context: ./agent
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ./agent:/agent
|
|
||||||
- ./.Key.js:/agent/.Key.js
|
- ./.Key.js:/agent/.Key.js
|
||||||
- ./config.js:/agent/config.js
|
- ./config.js:/agent/config.js
|
||||||
- ./AuctionServices:/agent/AuctionServices
|
- ./AuctionServices:/agent/AuctionServices
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
# scrapper:
|
scrapper:
|
||||||
# build:
|
build:
|
||||||
# context: ./scrapper
|
context: ./scrapper
|
||||||
# dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
# ports:
|
ports:
|
||||||
# - 3020
|
- "3020"
|
||||||
# volumes:
|
volumes:
|
||||||
# - ./scrapper:/scrapper
|
- ./.Key.js:/scrapper/.Key.js
|
||||||
# - ./.Key.js:/scrapper/.Key.js
|
- ./config.js:/scrapper/config.js
|
||||||
# - ./config.js:/scrapper/config.js
|
- ./AuctionServices:/scrapper/AuctionServices
|
||||||
# - ./AuctionServices:/scrapper/AuctionServices
|
networks:
|
||||||
# networks:
|
- internal
|
||||||
# - internal
|
labels:
|
||||||
# labels:
|
- "traefik.enable=true"
|
||||||
# - "traefik.enable=true"
|
- "traefik.http.routers.jucundus-agent1.rule=Host(`jucundus-agent1.saucisse.ninja`)"
|
||||||
# - "traefik.http.routers.backend.rule=Host(`jucundus-agent1.saucisse.ninja`)"
|
- "traefik.http.routers.jucundus-agent1.entrypoints=websecure"
|
||||||
# - "traefik.http.routers.backend.entrypoints=websecure"
|
- "traefik.http.routers.jucundus-agent1.tls=true"
|
||||||
# - "traefik.http.routers.backend.tls=true"
|
- "traefik.http.routers.jucundus-agent1.tls.certresolver=myresolver"
|
||||||
# - "traefik.http.routers.backend.tls.certresolver=myresolver"
|
- "traefik.http.services.jucundus-agent1.loadbalancer.server.port=3020"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
// Config Dev
|
||||||
|
console.log('## CONFIG DEV ##');
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
jucundus: {
|
||||||
|
url: 'http://host.docker.internal:3000',
|
||||||
|
useremail: 'agent@agent.com'
|
||||||
|
},
|
||||||
|
agent: {
|
||||||
|
urlApi: 'http://agent/internApi',
|
||||||
|
maxCloseWebsockets: 5,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = { config };
|
||||||
|
|
@ -1,20 +1,21 @@
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
const { config } = require("../config.js");
|
||||||
|
|
||||||
class Jucundus {
|
class Jucundus {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.url = 'http://localhost:3000/api';
|
this.url = config.jucundus+'/api';
|
||||||
}
|
}
|
||||||
|
|
||||||
setSaleStatus(status) {
|
// setSaleStatus(status) {
|
||||||
fetch(ApiURL+'/sale/setSaleStatus/'+status)
|
// fetch(ApiURL+'/sale/setSaleStatus/'+status)
|
||||||
.then(response => response.json())
|
// .then(response => response.json())
|
||||||
.then(data => {
|
// .then(data => {
|
||||||
res.json(data);
|
// res.json(data);
|
||||||
})
|
// })
|
||||||
.catch(error => {
|
// .catch(error => {
|
||||||
console.error(error);
|
// console.error(error);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Jucundus
|
module.exports = Jucundus
|
||||||
Loading…
Reference in New Issue