[~] Refactor
This commit is contained in:
		
							parent
							
								
									d06a7655d7
								
							
						
					
					
						commit
						3163641646
					
				
							
								
								
									
										1
									
								
								docker/js/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										1
									
								
								docker/js/Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | FROM node as base | ||||||
							
								
								
									
										9
									
								
								docker/js/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										9
									
								
								docker/js/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							| @ -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
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										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 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user