Created
September 9, 2016 01:22
-
-
Save jjcodes78/311009b1ad308da86a0b5fc9e2e06cec to your computer and use it in GitHub Desktop.
Docker compose for Vuejs Projects
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: | |
#------------------------------------------------------------ | |
# Web server - For live reload and development | |
# This environment can be used to run npm and node | |
# commands as well | |
# Credits: http://github.com/codecasts/ambientum | |
#------------------------------------------------------------ | |
dev: | |
image: ambientum/node:6 | |
container_name: sandbox-vue-dev | |
command: npm run dev | |
volumes: | |
- .:/var/www/app | |
ports: | |
- 8080:8080 | |
# Testing dist on a "real" webserver | |
production-server: | |
image: nginx:stable-alpine | |
container_name: sandbox-preview-server | |
volumes: | |
- ./dist:/usr/share/nginx/html | |
ports: | |
- 9090:80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why does Vue.js follow this
npm run dev
init format instead ofnpm start
? I have to reconfigure for cloud architecture due to this with dynamic environment./end rant