32 lines
		
	
	
		
			641 B
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			641 B
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
| #!/sbin/openrc-run
 | |
| 
 | |
| description="Sigmah docker container"
 | |
| 
 | |
| depend() {
 | |
| 	need docker postfix postgres
 | |
| }
 | |
| 
 | |
| start() {
 | |
| 	/usr/bin/docker run -d --rm \
 | |
| 	--name sigmah \
 | |
| 	-h sigmah \
 | |
| 	--link postfix \
 | |
| 	--link postgres \
 | |
| 	-v /srv/sigmah/data:/srv/sigmah/data \
 | |
| 	-v /srv/sigmah/conf/persistence.xml:/srv/tomcat/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml \
 | |
| 	-v /srv/sigmah/conf/sigmah.properties:/srv/tomcat/webapps/sigmah/WEB-INF/classes/sigmah.properties \
 | |
| 	sigmah
 | |
| }
 | |
| 
 | |
| start_post() {
 | |
| 	/usr/bin/spotter-appmgr register-proxy sigmah
 | |
| }
 | |
| 
 | |
| stop_pre() {
 | |
| 	/usr/bin/spotter-appmgr unregister-proxy sigmah
 | |
| }
 | |
| 
 | |
| stop() {
 | |
| 	/usr/bin/docker stop sigmah
 | |
| }
 |