-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Containerize the development environment
Improve the developer experience by containerizing the development environment – this is in particular helpful when switching between projects that require different node and npm versions. Changes: * Update the docker-compose to the new format (version: 2) * Add Dockerfile to build the development environment * Adjust docker-compose to build and run the development-environment * Update the documentation to reflect the changes
- Loading branch information
Orlando Hohmeier
committed
Feb 8, 2017
1 parent
bf6ced4
commit 2d79b7b
Showing
3 changed files
with
108 additions
and
99 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:5.4.1 | ||
|
||
MAINTAINER Orlando Hohmeier <orlando@mesosphere.io> | ||
|
||
WORKDIR /opt/marathon-ui | ||
|
||
ADD . /opt/marathon-ui/ | ||
|
||
USER root | ||
|
||
VOLUME "/opt/marathon-ui/tests" | ||
VOLUME "/opt/marathon-ui/dist" | ||
|
||
ENTRYPOINT ["npm"] | ||
CMD ["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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,90 @@ | ||
zookeeper: | ||
image: zookeeper:3.4.9 | ||
hostname: zookeeper | ||
ports: | ||
- "2181:2181" | ||
mesos-master: | ||
image: mesosphere/mesos-master:1.1.0-2.0.107.ubuntu1404 | ||
hostname: mesos-master | ||
entrypoint: [ "mesos-master" ] | ||
ports: | ||
- "5050:5050" | ||
links: | ||
- zookeeper | ||
environment: | ||
- MESOS_CLUSTER=local | ||
- MESOS_HOSTNAME=mesos-master.docker | ||
- MESOS_LOG_DIR=/var/log | ||
- MESOS_QUORUM=1 | ||
- MESOS_WORK_DIR=/var/lib/mesos | ||
- MESOS_ROLES=public | ||
- MESOS_ZK=zk://zookeeper:2181/mesos | ||
- MESOS_ACLS=file:///mesos-config/acls | ||
- MESOS_CREDENTIALS=file:///mesos-config/credentials | ||
volumes: | ||
- ./resources/mesos-config:/mesos-config | ||
mesos-slave: | ||
image: mesosphere/mesos-slave:1.1.0-2.0.107.ubuntu1404 | ||
entrypoint: | ||
- mesos-slave | ||
privileged: true | ||
hostname: mesos-slave | ||
ports: | ||
- "5051:5051" | ||
links: | ||
- zookeeper | ||
- mesos-master | ||
environment: | ||
- MESOS_CONTAINERIZERS=mesos | ||
- MESOS_ISOLATOR=cgroups/cpu, cgroups/mem | ||
- MESOS_LOG_DIR=var/log | ||
- MESOS_MASTER=zk://zookeeper:2181/mesos | ||
- MESOS_PORT=5051 | ||
- MESOS_WORK_DIR=/var/lib/mesos | ||
- MESOS_EXECUTOR_REGISTRATION_TIMEOUT=5mins | ||
- MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD=90secs | ||
- MESOS_DOCKER_STOP_TIMEOUT=60secs | ||
- MESOS_RESOURCES=cpus:4;mem:1280;disk:25600;ports(*):[12000-12999] | ||
marathon-service: | ||
image: mesosphere/marathon:latest-dev | ||
expose: | ||
- "8080" | ||
links: | ||
- zookeeper | ||
- mesos-master | ||
environment: | ||
- MARATHON_ZK=zk://zookeeper:2181/marathon | ||
- MARATHON_MASTER=zk://zookeeper:2181/mesos | ||
- MARATHON_DECLINE_OFFER_DURATION=3600000 | ||
- MARATHON_PLUGIN_DIR=/plugins | ||
- MARATHON_PLUGIN_CONF=/plugin-conf.json | ||
- MARATHON_MESOS_AUTHENTICATION_PRINCIPAL=marathon | ||
- MARATHON_MESOS_AUTHENTICATION_SECRET_FILE=/marathon.secret | ||
- MARATHON_MESOS_ROLE=public | ||
volumes: | ||
- ./resources/marathon-plugins:/plugins | ||
- ./resources/marathon.plugin-conf.json:/plugin-conf.json | ||
- ./resources/marathon.secret:/marathon.secret | ||
marathon-ui: | ||
image: nginx:latest | ||
hostname: marathon-ui | ||
ports: | ||
- "8080:8080" | ||
links: | ||
- marathon-service | ||
environment: | ||
- DNSDOCK_ALIAS=marathon.docker | ||
volumes: | ||
- ./dist:/usr/share/nginx/html | ||
- ./resources/marathon-ui.nginx.conf:/etc/nginx/nginx.conf | ||
version: '2' | ||
|
||
services: | ||
zookeeper: | ||
image: zookeeper:3.4.9 | ||
hostname: zookeeper | ||
ports: | ||
- "2181:2181" | ||
mesos-master: | ||
image: mesosphere/mesos-master:1.1.0-2.0.107.ubuntu1404 | ||
hostname: mesos-master | ||
entrypoint: [ "mesos-master" ] | ||
ports: | ||
- "5050:5050" | ||
links: | ||
- zookeeper | ||
environment: | ||
- MESOS_CLUSTER=local | ||
- MESOS_HOSTNAME=mesos-master.docker | ||
- MESOS_LOG_DIR=/var/log | ||
- MESOS_QUORUM=1 | ||
- MESOS_WORK_DIR=/var/lib/mesos | ||
- MESOS_ROLES=public | ||
- MESOS_ZK=zk://zookeeper:2181/mesos | ||
- MESOS_ACLS=file:///mesos-config/acls | ||
- MESOS_CREDENTIALS=file:///mesos-config/credentials | ||
volumes: | ||
- ./resources/mesos-config:/mesos-config | ||
mesos-slave: | ||
image: mesosphere/mesos-slave:1.1.0-2.0.107.ubuntu1404 | ||
entrypoint: | ||
- mesos-slave | ||
privileged: true | ||
hostname: mesos-slave | ||
ports: | ||
- "5051:5051" | ||
links: | ||
- zookeeper | ||
- mesos-master | ||
environment: | ||
- MESOS_CONTAINERIZERS=mesos | ||
- MESOS_ISOLATOR=cgroups/cpu, cgroups/mem | ||
- MESOS_LOG_DIR=var/log | ||
- MESOS_MASTER=zk://zookeeper:2181/mesos | ||
- MESOS_PORT=5051 | ||
- MESOS_WORK_DIR=/var/lib/mesos | ||
- MESOS_EXECUTOR_REGISTRATION_TIMEOUT=5mins | ||
- MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD=90secs | ||
- MESOS_DOCKER_STOP_TIMEOUT=60secs | ||
- MESOS_RESOURCES=cpus:4;mem:1280;disk:25600;ports(*):[12000-12999] | ||
marathon-service: | ||
image: mesosphere/marathon:v1.4.0-RC5 | ||
expose: | ||
- "8080" | ||
links: | ||
- zookeeper | ||
- mesos-master | ||
environment: | ||
- MARATHON_ZK=zk://zookeeper:2181/marathon | ||
- MARATHON_MASTER=zk://zookeeper:2181/mesos | ||
- MARATHON_DECLINE_OFFER_DURATION=3600000 | ||
- MARATHON_PLUGIN_DIR=/plugins | ||
- MARATHON_PLUGIN_CONF=/plugin-conf.json | ||
- MARATHON_MESOS_AUTHENTICATION_PRINCIPAL=marathon | ||
- MARATHON_MESOS_AUTHENTICATION_SECRET_FILE=/marathon.secret | ||
- MARATHON_MESOS_ROLE=public | ||
volumes: | ||
- ./resources/marathon-plugins:/plugins | ||
- ./resources/marathon.plugin-conf.json:/plugin-conf.json | ||
- ./resources/marathon.secret:/marathon.secret | ||
marathon-ui: | ||
image: nginx:latest | ||
hostname: marathon-ui | ||
ports: | ||
- "8080:8080" | ||
links: | ||
- marathon-service | ||
environment: | ||
- DNSDOCK_ALIAS=marathon.docker | ||
volumes: | ||
- ./resources/marathon-ui.nginx.conf:/etc/nginx/nginx.conf | ||
- dist:/usr/share/nginx/html | ||
develop-environment: | ||
build: | ||
context: . | ||
volumes: | ||
- ./src:/opt/marathon-ui/src | ||
- dist:/opt/marathon-ui/dist | ||
volumes: | ||
dist: {} |