diff --git a/.travis.yml b/.travis.yml index e4768f10..3e54ea9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,19 +42,9 @@ after_success: - docker-compose stop - docker-compose build --no-cache - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" -- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_BUILD_ID -- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_BUILD_ID +- docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest +- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest env: global: - APP_IMAGE_NAME=p5jswebeditor_app - -# deploy: -# provider: elasticbeanstalk -# access_key_id: $AWS_ACCESS_KEY -# secret_access_key: -# secure: $AWS_SECRET_KEY -# region: $AWS_REGION -# app: $AWS_EBS_APP -# env: $AWS_EBS_ENV -# bucket_name: "the-target-S3-bucket" \ No newline at end of file diff --git a/Dockerrun.aws.json b/Dockerrun.aws.json deleted file mode 100644 index ba49309a..00000000 --- a/Dockerrun.aws.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "AWSEBDockerrunVersion": 2, - "authentication": { - "bucket": "", - "key": ".dockercfg" - }, - "volumes": [ - { - "name": "storage", - "host": { - "sourcePath": "/var/data" - } - }, - { - "name": "app", - "host": { - "sourcePath": "/var/app/current/app" - } - } - ], - "containerDefinitions": [ - { - "name": "mongo", - "image": "mongo:3.4", - "essential": true, - "memory": 512, - "portMappings": [ - { - "hostPort": 27017, - "containerPort": 27017 - } - ], - "mountPoints": [ - { - "sourceVolume": "storage", - "containerPath": "/var/opt/mongo" - } - ], - "environment": [ - { - "name": "MYSQL_ROOT_PASSWORD", - "value": "password" - }, - { - "name": "MYSQL_DATABASE", - "value": "my_db" - } - ] - }, - { - "name": "app", - "image": ":", - "essential": true, - "memory": 256, - "portMappings": [ - { - "hostPort": 80, - "containerPort": 80 - } - ], - "links": [ - "db" - ], - "mountPoints": [ - { - "sourceVolume": "app", - "containerPath": "/var/opt/app", - "readOnly": true - } - ] - }, - { - "name": "nginx", - "essential": true, - "memory": 128, - "portMappings": [ - { - "hostPort": 80, - "containerPort": 8000 - } - ], - "links": [ - "app" - ], - "mountPoints": [ - { - "sourceVolume": "awseb-logs-nginx-proxy", - "containerPath": "/var/log/nginx" - } - ] - } - ] -} \ No newline at end of file diff --git a/docker-cloud.yml b/docker-cloud.yml new file mode 100644 index 00000000..82502897 --- /dev/null +++ b/docker-cloud.yml @@ -0,0 +1,40 @@ +version: '3.4' +services: + mongo: + image: mongo:3.4 + volumes: + - dbdata:/data/db + - "$PWD/mongo/:/docker-entrypoint-initdb.d/" + ports: + - '27017:27017' + environment: + - MONGO_INITDB_ROOT_USERNAME + - MONGO_INITDB_ROOT_PASSWORD + - MONGO_INITDB_DATABASE + - MONGO_RW_USERNAME + - MONGO_RW_PASSWORD + nginx: + image: nginx:1.13 + volumes: + - "$PWD/nginx/alpha.editor.p5js.org.conf:/etc/nginx/conf.d/default.conf" + ports: + - '80:80' + links: + - app + app: + image: catarak/p5.js-web-editor + environment: + - MONGO_URL=mongodb://mongo:27017/p5js-web-editor + - MONGO_HOSTNAME=mongo + # - API_URL=https://localhost/api + # - PORT=80 + volumes: + - .:/opt/node/app + - /opt/node/app/node_modules + ports: + - '8000:8000' + # - '443:443' + links: + - mongo +volumes: + dbdata: diff --git a/docker-compose.yml b/docker-compose.yml index 4676f017..5d518c9a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - '27017:27017' # restart: always # env_file: - # - .env + # - "$PWD/.env" nginx: image: nginx:1.13 volumes: @@ -26,7 +26,7 @@ services: dockerfile: Dockerfile target: production # env_file: - # - .env + # - "$PWD/.env" environment: - MONGO_URL=mongodb://mongo:27017/p5js-web-editor - MONGO_HOSTNAME=mongo