{"action":"created","issue":{"url":"https://api.github.com/repos/githubsaturn/captainduckduck/issues/104","repository_url":"https://api.github.com/repos/githubsaturn/captainduckduck","labels_url":"https://api.github.com/repos/githubsaturn/captainduckduck/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/githubsaturn/captainduckduck/issues/104/comments","events_url":"https://api.github.com/repos/githubsaturn/captainduckduck/issues/104/events","html_url":"https://github.com/githubsaturn/captainduckduck/issues/104","id":286545375,"node_id":"MDU6SXNzdWUyODY1NDUzNzU=","number":104,"title":"launch a simple couchDB docker image ","user":{"login":"rokal","id":15863187,"node_id":"MDQ6VXNlcjE1ODYzMTg3","avatar_url":"https://avatars1.githubusercontent.com/u/15863187?v=4","gravatar_id":"","url":"https://api.github.com/users/rokal","html_url":"https://github.com/rokal","followers_url":"https://api.github.com/users/rokal/followers","following_url":"https://api.github.com/users/rokal/following{/other_user}","gists_url":"https://api.github.com/users/rokal/gists{/gist_id}","starred_url":"https://api.github.com/users/rokal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokal/subscriptions","organizations_url":"https://api.github.com/users/rokal/orgs","repos_url":"https://api.github.com/users/rokal/repos","events_url":"https://api.github.com/users/rokal/events{/privacy}","received_events_url":"https://api.github.com/users/rokal/received_events","type":"User","site_admin":false},"labels":[{"id":730185085,"node_id":"MDU6TGFiZWw3MzAxODUwODU=","url":"https://api.github.com/repos/githubsaturn/captainduckduck/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-01-07T06:03:17Z","updated_at":"2018-12-11T12:49:09Z","closed_at":"2018-01-08T00:51:18Z","author_association":"NONE","body":"Hello guys,\r\n\r\nI've been struggling on how to launch a simple couchdb image in my captain duck duck space.\r\nI put my `one line script in a sh file` so that I can execute it in captain-definition file. \r\nHere is how I did:\r\n\r\n```\r\n{\r\n    \"schemaVersion\" :1 ,\r\n    \"dockerfileLines\" :[\r\n        \"FROM ubuntu:16.04\",\r\n        \"RUN chmod +x ./src/bootstrap.sh\",\r\n        \"RUN ./src/bootstart.sh\"\r\n    ]\r\n}\r\n```\r\nMy boostrap.sh file is : \r\n\r\n```\r\n#!/bin/sh\r\n\r\ndocker run -d --name couchdb -p 5984:5984 -e COUCHDB_USERNAME=$COUCHDB_USERNAME -e COUCHDB_PASSWORD=$COUCHDB_PASSWORD -e COUCHDB_DBNAME=$COUCHDB_NAME klaemo/couchdb .\r\n\r\n```\r\nI setted up my env variables (`COUCHDB_PASSWORD, COUCHDB_USERNAME,  COUCHDB_NAME` ) in my captain app.\r\n\r\n\r\nI end up with errors I can't understand. \r\n\r\nCould you please help me know I I can achieve this?\r\n\r\nI also continued some tests and I found that there is something I'm surely missing.\r\n\r\nMy express app entrypoint:\r\n\r\n```\r\nvar PouchDB = require('pouchdb');\r\nvar express = require('express');\r\n\r\nvar app = require('express-pouchdb')({\r\n    mode: 'fullCouchDB',\r\n    overrideMode: {\r\n      include: ['routes/fauxton']\r\n    }\r\n  });\r\napp.setPouchDB(PouchDB);\r\nconst port = process.env.PORT || 3001\r\nconsole.log(`listenning at ${port}`)\r\napp.listen(port);\r\n\r\n```\r\ncaptain-definition : \r\n\r\n```\r\n{\r\n  \"schemaVersion\" :1 ,\r\n \"dockerfileLines\" :[\r\n        \"FROM node:8.7.0-alpine\",\r\n        \"RUN mkdir -p /usr/src/app\",\r\n        \"WORKDIR /usr/src/app\",\r\n        \"COPY ./src/package.json /usr/src/app/\",\r\n        \"RUN npm install && npm cache clean --force\",\r\n        \"COPY ./src /usr/src/app\",\r\n        \"ENV NODE_ENV production\",\r\n        \"ENV PORT 3001\",\r\n        \"EXPOSE 3001\",\r\n        \"CMD [ \\\"npm\\\", \\\"start\\\" ]\"\r\n    ]\r\n }\r\n```\r\n\r\nI deployed it and in the console, I got successful deployment but When I go to https://neerem-backend.neerem.hakilikoura.com, I got 502 Error.\r\n\r\nI'll really appreciate some help here.\r\n\r\nThanks\r\n  "},"comment":{"url":"https://api.github.com/repos/githubsaturn/captainduckduck/issues/comments/446190923","html_url":"https://github.com/githubsaturn/captainduckduck/issues/104#issuecomment-446190923","issue_url":"https://api.github.com/repos/githubsaturn/captainduckduck/issues/104","id":446190923,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjE5MDkyMw==","user":{"login":"iamrommel","id":177265,"node_id":"MDQ6VXNlcjE3NzI2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/177265?v=4","gravatar_id":"","url":"https://api.github.com/users/iamrommel","html_url":"https://github.com/iamrommel","followers_url":"https://api.github.com/users/iamrommel/followers","following_url":"https://api.github.com/users/iamrommel/following{/other_user}","gists_url":"https://api.github.com/users/iamrommel/gists{/gist_id}","starred_url":"https://api.github.com/users/iamrommel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamrommel/subscriptions","organizations_url":"https://api.github.com/users/iamrommel/orgs","repos_url":"https://api.github.com/users/iamrommel/repos","events_url":"https://api.github.com/users/iamrommel/events{/privacy}","received_events_url":"https://api.github.com/users/iamrommel/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T12:49:09Z","updated_at":"2018-12-11T12:49:09Z","author_association":"CONTRIBUTOR","body":"Further reading about setting up couchdb and setting up nginx as proxy https://cwiki.apache.org/confluence/display/COUCHDB/Nginx+as+a+proxy\r\n\r\nWhen you plan to use continuous replication, the _changes url needs special attention to work. See the above documentation on setting it up"}}
{"actor":{"display_login":"iamrommel"}}