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 container_name: cultum
hostname: cultum hostname: cultum
restart: always restart: always
network_mode: "bridge" networks:
dns: prism:
- 1.1.1.1 ipv4_address: 172.25.36.69
- 1.0.0.1
ports: ports:
- 80:80 - 80:80
volumes: volumes:
@ -20,9 +19,15 @@ services:
depends_on: depends_on:
- cultum - cultum
restart: always restart: always
network_mode: "bridge" networks:
dns: prism:
- 1.1.1.1 ipv4_address: 172.25.36.21
- 1.0.0.1
volumes: volumes:
- ./config.ts:/opt/thaldrin/config.ts - ./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", "docker:down": "docker-compose down",
"git:init": "npm run subs:init && npm run subs:update", "git:init": "npm run subs:init && npm run subs:update",
"subs:init": "git submodule init && git submodule 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": { "dependencies": {
"@thaldrin/sourcefinder": "^1.0.3", "@thaldrin/sourcefinder": "^1.0.3",