Created
November 27, 2019 01:22
-
-
Save wilcorrea/18d291bfa18a2730a155095aabbddd44 to your computer and use it in GitHub Desktop.
This file contains 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 | |
if [[ ! -d /var/www/app/node_modules ]]; then | |
echo "~> installing dependencies" | |
yarn install | |
fi | |
if [[ ! -f /home/node/bin/node && -f /usr/local/bin/node ]]; then | |
echo "~> expose bin" | |
cp /usr/local/bin/node /home/node/bin/node | |
echo "~> fix permissions" | |
chown -R node:node . | |
fi | |
echo "Details: '$(pwd)'" | |
echo "~> starting dev" | |
yarn run serve |
This file contains 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: '3' | |
services: | |
front: | |
image: node:10 | |
container_name: front | |
working_dir: /var/www/app | |
command: /bin/bash /var/www/app/docker-compose.sh | |
volumes: | |
- .:/var/www/app | |
- .bin:/home/node/bin | |
ports: | |
- 8080:8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment