docker shit

This commit is contained in:
Lio Young 2021-10-31 22:40:38 +01:00
parent c67839e2ea
commit 7a2bc76d19
3 changed files with 30 additions and 9 deletions

View File

@ -4,10 +4,9 @@ services:
container_name: cultum
hostname: cultum
restart: always
network_mode: "bridge"
dns:
- 1.1.1.1
- 1.0.0.1
networks:
prism:
ipv4_address: 172.25.36.69
ports:
- 80:80
volumes:
@ -20,9 +19,15 @@ services:
depends_on:
- cultum
restart: always
network_mode: "bridge"
dns:
- 1.1.1.1
- 1.0.0.1
networks:
prism:
ipv4_address: 172.25.36.21
volumes:
- ./config.ts:/opt/thaldrin/config.ts
networks:
prism:
driver: bridge
ipam:
config:
- subnet: 172.25.36.0/24

15
docker.js Normal file
View File

@ -0,0 +1,15 @@
// docker-compose up -d --no-deps --build $service
const { exec } = require('child_process');
const args = process.argv.slice(2)
console.log(`RUNNING rebuild with args:`, args);
exec(
`docker-compose up -d --no-deps --build ${args[0]}`,
(error, stdout) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.info(`stdout: ${stdout}`);
}
);

View File

@ -11,7 +11,8 @@
"docker:down": "docker-compose down",
"git:init": "npm run subs:init && npm run subs:update",
"subs:init": "git submodule init && git submodule update",
"subs:update": "git submodule update --remote"
"subs:update": "git submodule update --remote",
"rebuild": "node docker.js"
},
"dependencies": {
"@thaldrin/sourcefinder": "^1.0.3",