GithubHelp home page GithubHelp logo

dockerized-ember-cli's Introduction

dockerized-ember-cli

Image Tags on DockerHub

Includes:

  • ember
  • npm
  • bower
  • phantomjs
  • watchman

The internal app directory is /web, so keep that in mind for your docker-compose setups.

Once built, be sure to run npm install in the context of the container before running your ember dev-server. :-)

Example

Running ember server

docker-compose up

Testing

docker-compose run --rm dev ember server

Less Typing

#!/bin/bash
if [[ -n "$1" ]]; then
  echo "Running Command: $*"
  docker-compose run --rm dev $*
else
  echo "Booting Environment..."
  # make extra sure that the images are built
  docker-compose build

  # start up everything
  docker-compose up
fi

and then...

starting the ember server:

./run

testing:

./run ember server

be sure to chmod +x run

Files

# Dockerfile
FROM nullvoxpopuli/ember-cli:2.14.1
USER root

ADD bower.json   /web/bower.json
RUN bower install
ADD package.json /web/package.json
RUN yarn install
# docker-compose.yml
version: "2"
services:
  # for development only
  # assets are compiled and stored on s3 for production
  dev:
    build:
      context: .
      dockerfile: ./Dockerfile
    command: bash -c "ember server --port 4300 --live-reload-port 59153"
    ports:
      - 4300:4300
      - 59153:59153
    volumes:
      # Mount the app code inside the container's `/web` directory
      # This keeps the container's dependencies tied to the container, and doesn't
      # pollute your project root
      - ./app:/web/app
      - ./config:/web/config
      - ./mirage:/web/mirage
      - ./public:/web/public
      - ./scripts:/web/scripts
      - ./tests:/web/tests
      - ./vendor:/web/vendor

      - ./.bowerrc:/web/.bowerrc
      - ./.ember-cli:/web/.ember-cli
      - ./.eslintignore:/web/.eslintignore
      - ./.eslintrc.js:/web/.eslintrc.js
      - ./bower.json:/web/bower.json
      - ./ember-cli-build.js:/web/ember-cli-build.js
      - ./package.json:/web/package.json
      - ./testem.js:/web/testem.js
      - ./yarn.lock:/web/yarn.lock

    # ember deploy production / ember deploy staging
    # change / create this to deploy
    env_file:
      - .env
    environment:
      - STRIPE_CLIENT_ID=thevalue

Windows users

You will need to add --watcher polling in command as a parameter. it is likely that the changes of file on host machine will not correctly processed inside the docker. Changing a watchman from tracking events to polling file updates will solve the issue with live reloads.

dockerized-ember-cli's People

Contributors

dutsik avatar mnifakram avatar nullvoxpopuli avatar

Watchers

 avatar  avatar  avatar

Forkers

dutsik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.