Merge branch 'development-server' into 'main'
Development server See merge request infra/neo!2
This commit is contained in:
commit
906e1e7765
4 changed files with 31 additions and 3 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "env"]
|
||||
path = env
|
||||
url = git@git.faulty.nl:infra/env
|
13
docker-compose.development.yml
Normal file
13
docker-compose.development.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
version: '2.2'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mariadb:10.3
|
||||
container_name: mysql
|
||||
restart: always
|
||||
env_file:
|
||||
- ./env/dev.database.env
|
||||
volumes:
|
||||
- /srv/devdb/data:/var/lib/mysql
|
||||
ports:
|
||||
- 3306:3306
|
1
env
Submodule
1
env
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit ef2b833d837a4b171ca36713b9b13bc6fe957a3e
|
|
@ -30,9 +30,9 @@ def main():
|
|||
|
||||
ap.add_argument("--savefile", help="The savefile to use",
|
||||
default=os.path.expanduser("~/.local/faulty/neo.save"))
|
||||
ap.add_argument("--del-savefile", help="Delete the savefile",
|
||||
ap.add_argument("--del-savefile", "--rm-save", help="Delete the savefile",
|
||||
action="store_true")
|
||||
ap.add_argument("--ignore-savefile", help="Ignore the savefile",
|
||||
ap.add_argument("--ignore-savefile", "--no-load", help="Ignore the savefile",
|
||||
action="store_true")
|
||||
|
||||
# -x, --exclude: e.g. -x this -x that
|
||||
|
@ -75,11 +75,21 @@ def main():
|
|||
|
||||
if args.save:
|
||||
savefile["files"] = files
|
||||
return
|
||||
|
||||
def handle_aliases(fnlist: dict, name: str):
|
||||
return fnlist.get(name, lambda: print("does not exist"))
|
||||
|
||||
def dump_data():
|
||||
print(f"savefile: {args.savefile}")
|
||||
print(f"del_savefile: {args.del_savefile}")
|
||||
print(f"ignore_savefile: {args.ignore_savefile}")
|
||||
print(f"exclude: {args.exclude}")
|
||||
print(f"include: {args.include}")
|
||||
print(f"save: {args.save}")
|
||||
print(f"action: {args.action}")
|
||||
print(f"args: {args.args}")
|
||||
print(f"files: {files}")
|
||||
|
||||
fnlist = {
|
||||
"up": lambda: dc(f"up -d {' '.join(args.args)}"),
|
||||
"upr": lambda: dc(f"up -d --build {' '.join(args.args)}"),
|
||||
|
@ -87,6 +97,7 @@ def main():
|
|||
"default": lambda: dc(f"{' '.join(args.args)}"),
|
||||
"setup": lambda: setup_handler(args.args[0]),
|
||||
"delete-project-files": lambda: os.system(f"sudo rm -rf /srv/{args.args[0]}"),
|
||||
"_dump": lambda: dump_data(),
|
||||
|
||||
"dpf": lambda: handle_aliases(fnlist, "delete-project-files")()
|
||||
}
|
||||
|
|
Reference in a new issue