{"action":"closed","issue":{"url":"https://api.github.com/repos/prismagraphql/prisma/issues/2907","repository_url":"https://api.github.com/repos/prismagraphql/prisma","labels_url":"https://api.github.com/repos/prismagraphql/prisma/issues/2907/labels{/name}","comments_url":"https://api.github.com/repos/prismagraphql/prisma/issues/2907/comments","events_url":"https://api.github.com/repos/prismagraphql/prisma/issues/2907/events","html_url":"https://github.com/prismagraphql/prisma/issues/2907","id":349732402,"node_id":"MDU6SXNzdWUzNDk3MzI0MDI=","number":2907,"title":"Prisma 1.13 server port is hardcoded to 9000","user":{"login":"dijbi","id":42296521,"node_id":"MDQ6VXNlcjQyMjk2NTIx","avatar_url":"https://avatars3.githubusercontent.com/u/42296521?v=4","gravatar_id":"","url":"https://api.github.com/users/dijbi","html_url":"https://github.com/dijbi","followers_url":"https://api.github.com/users/dijbi/followers","following_url":"https://api.github.com/users/dijbi/following{/other_user}","gists_url":"https://api.github.com/users/dijbi/gists{/gist_id}","starred_url":"https://api.github.com/users/dijbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dijbi/subscriptions","organizations_url":"https://api.github.com/users/dijbi/orgs","repos_url":"https://api.github.com/users/dijbi/repos","events_url":"https://api.github.com/users/dijbi/events{/privacy}","received_events_url":"https://api.github.com/users/dijbi/received_events","type":"User","site_admin":false},"labels":[{"id":824910327,"node_id":"MDU6TGFiZWw4MjQ5MTAzMjc=","url":"https://api.github.com/repos/prismagraphql/prisma/labels/needs-more-info","name":"needs-more-info","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-11T12:58:19Z","updated_at":"2018-08-14T08:51:14Z","closed_at":"2018-08-14T08:51:14Z","author_association":"NONE","body":"Prisma 1.13 port is hard coded to 9000 and doesn't take care of the docker compose configuration. \r\n\r\n**To Reproduce**\r\n1. Docker compose  with Prisma 1.13 docker image.\r\n2. docker-compose up -d\r\n3. docker-compose logs\r\n\r\nServer is starting with 9000 port. Graphql playground is reachable on 9000 but not the server.\r\n\r\n**Additional context**\r\nHere 's below my initial post to PRISMA Forum before trying the 1.12 docker hub image.\r\n\r\n[...]\r\n\r\nMy config \r\n- OS:  Ubuntu 16.04\r\n- Docker version : 17.05.0-ce\r\n- Docker-compose version : 1.6.1\r\n- Docker image  prismagraphql/prisma\r\n- Prisma CLI  version : 1.13.7 \r\n- Node V8.8.1\r\n- Nginx 1.10.3 for reverse proxy \r\n- SSL with Let's encrypt\r\n\r\n\r\ndocker-compose.yml : \r\n```\r\n version: '3'\r\nservices:\r\n  prisma:\r\n    image: prismagraphql/prisma\r\n    restart: always\r\n    ports:\r\n    - \"4466:4466\"\r\n    environment:\r\n      PRISMA_CONFIG: |\r\n        port: 4466\r\n        enableManagementApi: true\r\n        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security\r\n        # managementApiSecret: __SECRET__\r\n        databases:\r\n          default:\r\n            connector: mysql\r\n            host: host.docker.internal\r\n            port: 3306\r\n            user: root\r\n            password: __PASS__\r\n            migrations: true\r\n      SQL_INTERNAL_PASSWORD: __PASS__\r\n      SQL_INTERNAL_HOST: mysql\r\n      SQL_INTERNAL_USER: root\r\n      SQL_INTERNAL_DATABASE: graphcool\r\n      SQL_INTERNAL_PORT: 3306\r\n      SQL_CLIENT_CONNECTION_LIMIT: 10\r\n      SQL_CLIENT_PASSWORD: __PASS__\r\n      SQL_CLIENT_USER: root\r\n      SQL_CLIENT_PASSWORD: __PASS__\r\n      SQL_CLIENT_HOST: mysql\r\n      SQL_CLIENT_PORT: 3306\r\n      CLUSTER_ADDRESS: https://{__CLUSTER_ADDRESS__}\r\n      SCHEMA_MANAGER_SECRET: ******\r\n    SCHEMA_MANAGER_ENDPOINT: https://{__CLUSTER_ADDRESS__}/manager/schema\r\n      RABBITMQ_URI: \"\"\r\n      BUGSNAP_API_KEY: \"\"\r\n  mysql:\r\n    image: mysql:5.7\r\n    restart: always\r\n    ports :\r\n      - 3306:3306\r\n    environment:\r\n      - MYSQL_DATABASE=graphcool\r\n      - MYSQL_ROOT_PASSWORD=PASS2\r\n      - MYSQL_ROOT_HOST=%\r\n    volumes:\r\n      - mysql:/var/lib/mysql\r\nvolumes:\r\n  mysql:\r\n```\r\n\r\nOutput from docker-compose logs\r\n\r\n> prisma_1  | Obtaining exclusive agent lock...\r\n> prisma_1  | Obtaining exclusive agent lock... Successful.\r\n> prisma_1  | Deployment worker initialization complete.\r\n> prisma_1  | Initializing workers...\r\n> prisma_1  | Successfully started 1 workers.\r\n> prisma_1  | Server running on :9000\r\n> prisma_1  | Version is up to date.\r\n> \r\n\r\nRelevant output from ipTables \r\n\r\n> Chain DOCKER \r\n> target     prot opt source               destination\r\n> []\r\n> ACCEPT     tcp  --  anywhere             172.22.0.2           tcp dpt:mysql\r\n> ACCEPT     tcp  --  anywhere             172.22.0.3           tcp dpt:4466\r\n> \r\n\r\nDocker ps -a output :\r\n\r\n> 86509c7937cf        prismagraphql/prisma          \"/app/bin/single-s...\"   XX minutes ago      Up About a minute         0.0.0.0:4466->4466/tcp   dockerprisma_prisma_1\r\n> 34b407e6a004        mysql:5.7                     \"docker-entrypoint...\"   XX minutes ago      Up About a minute         0.0.0.0:3306->3306/tcp   dockerprisma_mysql_1\r\n> \r\n> \r\n\r\nNginx Reverse Proxy config file : \r\n\r\n```\r\n server {\r\n        listen 80;\r\n        ##listen [::]:80 ipv6only=on;\r\n        server_name {__CLUSTER_ADDRESS__};\r\n        include /etc/nginx/snippets/letsencrypt.conf;\r\n        location / {\r\n         return 301 https://{__CLUSTER_ADDRESS__}$request_uri;\r\n        }\r\n \r\n }\r\n \r\n server {\r\n         server_name {__CLUSTER_ADDRESS__};\r\n         listen 443 ssl http2;\r\n         listen [::]:443 ssl http2 ipv6only=on;\r\n \r\n         ssl_certificate /etc/letsencrypt/live/{__CLUSTER_ADDRESS__}/fullchain.pem;\r\n         ssl_certificate_key /etc/letsencrypt/live/{__CLUSTER_ADDRESS__}/privkey.pem;\r\n         ssl_trusted_certificate /etc/letsencrypt/live/{__CLUSTER_ADDRESS__}/fullchain.pem;\r\n         include /etc/nginx/snippets/ssl.conf;\r\n \r\n         location / {\r\n \r\n                 proxy_set_header        Host $host;\r\n                 proxy_set_header        X-Real-IP $remote_addr;\r\n                 proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;\r\n                 proxy_set_header        X-Forwarded-Proto $scheme;\r\n \r\n                 proxy_pass               http://localhost:4466;\r\n                 proxy_redirect          http://locahost:4466/ $scheme://$host;\r\n                proxy_http_version      1.1;\r\n         }\r\n }\r\n \r\n \r\n```\r\nI did a simple :\r\nPrisma init helloword && cd helloworld && prisma deploy\r\nI used 'Other server' and put as an endpoint URL https://{__CLUSTER_ADDRESS__}, as service : Prisma, as stage : dev\r\nso my prisma.yml is : \r\n \r\nendpoint: https://{__CLUSTER_ADDRESS__},/prisma/dev\r\ndatamodel: datamodel.graphql\r\n\r\n-----------------------------------------------------------------------------------------------------\r\n\r\nWhat's stroke me first was the port the server was running on : 9000.\r\nEvery configuration file i've read so far were : 4466. I did try to put a NODE_PORT in .env file or directly in the docker-compose file and nothing changed.\r\nI was unable to reach the webserver at all and any curl command to the http(or https)://{__CLUSTER_ADDRESS__} gave me a 501 bad gateway error page.\r\n\r\nThe prisma container could reach the mysql container.\r\nA netstat -a inside the prisma container gave me no '4466' port open, but a '9000' port open, connection the mysql container was ok.\r\n\r\nSo i tried to change every occurence of the 4466 port to 9000 (in nginx reverse proxy cong file, docker-compose file, i recheck iptables) and finally i could get a response for the server with a graphql playground page.\r\n\r\nI have tried to  go to :  https://{__CLUSTER_ADDRESS__}/management and i have a nginx error  of 'no ressource can be found'. and https://{__CLUSTER_ADDRESS__}/manager/schema - i have a graphql playground page.\r\n\r\n-----\r\n\r\nI have tried changing the DOCKER image to 1.12, the 9000 port is gone for a 4466 (hey :smile:), the server is reachable.\r\n (I still have issue with prisma deploy... :()\r\n\r\n \r\n "}}
{"actor":{"display_login":"marktani"}}