mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-02-12 16:41:57 +00:00
Add startup script
This commit is contained in:
parent
a985e843bc
commit
3aeeb4f8fa
2 changed files with 26 additions and 1 deletions
|
@ -80,7 +80,10 @@ RUN gulp build
|
|||
# Create empty logs directory
|
||||
RUN mkdir -p logs
|
||||
|
||||
# Provide execute permissions for startup script
|
||||
RUN chmod 755 helpers/startup.sh
|
||||
|
||||
# Start services and start web server
|
||||
ENTRYPOINT service ssh start && mongod & gulp serve:dist:no_build
|
||||
ENTRYPOINT helpers/startup.sh
|
||||
|
||||
|
||||
|
|
22
helpers/startup.sh
Normal file
22
helpers/startup.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
COLOR_GREEN='\033[0;32m'
|
||||
|
||||
echo ""
|
||||
|
||||
# Start the ssh service. This is required by the playable web server
|
||||
service ssh start
|
||||
|
||||
# Check if volume needs to be mounted from S3
|
||||
|
||||
if [[ ${MOUNT_S3} = "True" ]];
|
||||
then
|
||||
echo "Mounting Amazon S3 Bucket to /opt/ansible-projects"
|
||||
yas3fs s3://${S3_PATH} /opt/ansible-projects -f
|
||||
fi
|
||||
|
||||
# Start MongoDB database in the background
|
||||
mongod &
|
||||
|
||||
# Serve web server
|
||||
gulp serve:dist:no_build
|
Loading…
Reference in a new issue