Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
EditionOpenAccess
/
eoa-1.5
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
3
Pull requests
0
Actions
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security
Insights
Files
master
docs
example_import
fixtures
res
scripts
config
utils
exec_in_container.py
exit.py
init.py
restart.py
run.py
stop.py
src
.dockerignore
.gitignore
Dockerfile
LICENSE
README.md
dependencies.conf
docker-compose.yaml
requirements.txt
Breadcrumbs
eoa-1.5
/
scripts
/
restart.py
Blame
Blame
Latest commit
History
History
executable file
·
52 lines (39 loc) · 956 Bytes
Breadcrumbs
eoa-1.5
/
scripts
/
restart.py
Top
File metadata and controls
Code
Blame
executable file
·
52 lines (39 loc) · 956 Bytes
Raw
#!/usr/bin/env python3 from utils.settings import BASE_DIR, load_config from utils.functions import run import subprocess import shlex import os from time import sleep def stop( env ): # run application subprocess.call( "docker-compose down", shell=True, env=env ) if __name__ == '__main__': from argparse import ArgumentParser config = load_config() parser = ArgumentParser( description="restart the webserver" ) parser.add_argument( "--build", action = "store_true" ) parser.add_argument( "CMD", nargs="*" ) args = parser.parse_args() stop( config ) CMD= \ (vars(args)['CMD']) run( env=config, build = args.build, cmd=CMD ) print("\n------------------------------\n") print("You can view the tail of container log output with 'docker-compose logs -f' (ctrl + c to stop).")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
You can’t perform that action at this time.