[~] Refactor

This commit is contained in:
Siarhei Siniak 2024-08-16 17:43:29 +03:00
parent d06a7655d7
commit 3163641646
3 changed files with 41 additions and 0 deletions

1
docker/js/Dockerfile Normal file

@ -0,0 +1 @@
FROM node as base

@ -0,0 +1,9 @@
version: '3.7'
services:
js:
build:
context: .
dockerfile: ./docker/js/Dockerfile
volumes:
- ./d1/:/app/d1/:ro
- ./tmp/cache/:/app/tmp/cache/:ro

31
m Executable file

@ -0,0 +1,31 @@
#!/usr/bin/env python3
#vim: set filetype=python
import sys
import optparse
import subprocess
import os
def js(argv):
return subprocess.check_call([
'sudo',
'docker-compose',
'--project-directory',
os.path.abspath(
os.path.dirname(__file__),
),
'-f',
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'docker', 'js',
'docker-compose.yml',
)
),
*argv,
])
if len(sys.argv) > 1 and sys.argv[1] == 'js':
js(sys.argv[2:])
else:
raise NotImplementedError