Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ember with Docker
version: '2'
services:
my-awesome-app:
build:
context: my-awesome-app/
dockerfile: Dockerfile
ports:
- "5400:5400"
- "54000:54000"
volumes:
- ./my-awesome-app/app:/my-awesome-app/app
- ./my-awesome-app/ember-cli-build.js:/my-awesome-app/ember-cli-build.js
- ./my-awesome-app/mirage:/my-awesome-app/mirage
- ./my-awesome-app/testem.js:/my-awesome-app/testem.js
- ./my-awesome-app/public:/my-awesome-app/public
- ./my-awesome-app/config:/my-awesome-app/config
- ./my-awesome-app/tests:/my-awesome-app/tests
- ./my-awesome-app/dist:/my-awesome-app/dist
FROM node:10
RUN apt-get update && apt-get install -y jq
# Install Watchman
RUN \
git clone https://github.com/facebook/watchman.git &&\
cd watchman &&\
git checkout v4.9.0 &&\
./autogen.sh &&\
./configure --without-python &&\
make &&\
make install
# Install Yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
ENV PATH /root/.yarn/bin:$PATH
RUN mkdir /my-awesome-app
WORKDIR /my-awesome-app
ADD ./package.json package.json
ADD ./yarn.lock yarn.lock
RUN yarn install
ENV PATH /my-awesome-app/node_modules/ember-cli/bin:$PATH
COPY . .
RUN ln -s /app/node_modules/ember-cli/bin/ember /usr/bin/ember
EXPOSE 5400 54000
CMD ["ember", "server", "--port", "5400", "--host", "0.0.0.0", "--live-reload-port", "54000", "--live-reload-host", "0.0.0.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment