Last active
November 3, 2016 03:27
-
-
Save catwarrior/b7bff42a49b954384d8ac83669690a4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
service_1: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
entrypoint: '/bin/bash' | |
command: './start_dev.sh' | |
env_file: | |
- ./development.env | |
volumes: | |
- .:/home/app/code | |
- /home/app/code/node_modules | |
- /home/app/code/bower_components | |
ports: | |
- 3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. /tashome/tasrtenv.sh | |
if [ ! -f "/tas-initialized" ]; then #check whether the TAS is initialized. | |
echo 'Initializing tas' | |
while ! mysqladmin ping -h$DB --silent; do | |
sleep 1 | |
done | |
no "no" | tasdbinit.sh; # prompts | |
/xx/abs-initdb.sh; | |
#mysql -h$TAS_DB -u$TAS_DB_USER -p$TAS_DB_PASSWORD $MYSQL_DATABASE < x.sql; | |
touch "/tas-initialized"; | |
echo 'TAS initialized'; | |
fi | |
# prevent process exit. | |
while true; | |
do sleep 1000; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:6.3.0 | |
RUN mkdir -p /home/app/code/node_modules | |
WORKDIR /home/app/code | |
ENV NODE_ENV development | |
RUN echo '{ "allow_root": true }' > /root/.bowerrc | |
COPY package.json /home/app/code/ | |
RUN npm cache clean && \ | |
npm install --silent --progress=false&& \ | |
apt-get clean | |
COPY bower.json /home/app/code/ | |
RUN ./node_modules/bower/bin/bower install --production --silent --config.interactive=false | |
COPY . /home/app/code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
host="$1" | |
shift | |
cmd="$@" | |
until psql -h "$host" -U "postgres" -c '\l'; do | |
>&2 echo "Postgres is unavailable - sleeping" | |
sleep 1 | |
done | |
>&2 echo "Postgres is up - executing command" | |
exec $cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment