Category: My linux experience
Hits: 4745
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

spider web with water beads network dewdrop1We develop a web-site using docker. Well, using docker-compose. So we have it working at our localhosts per team member, but we need run the docker at a real server under a real domain.

My server uses CentOS and CWP(CentOS Web Panel, Pro version). Usually a create a user, domain/subdomain/database. Then upload my web-site files, edit database credentials in the web-site config etc.

Docker wokrs in other way. So to run my docker-based project at my CWP-powered server I did the following.

The idea is easy. Run docker (I did via terminal) and in CWP assign proxy to my domain and point it to the docker web-server port.


  1. Install latest docker and docker-compose.
  2. I also followed this additional docker setup, which I think was not needed. So omit it till you get in trouble. .
  3. Create a user, allow many processes for it.


  4. Establish a proxy, which will point domain calls to your server to you docker instance. My docker web-server is running at port 8000, so at localhost I visit the development site like localhost:8000.
    • Go to WebServer Settings -> WebServer Domain Conf and select your domain
    • Select proxy and enter your docker server port
  5. Establish my docker project and run it.

    I did the following:

    • Logged in into my new account(I use non-standard port for SSH): ssh -p 1234
    • Cloned my project from git like git clone . You may just upload your files. My code is in coolprg folder. So I cd coolprg
    • Run my docker-compose up and wait till docker is up and running.
  6. So visiting your domain should should open your docker web-site now.


Found a typo? Please select it and press Ctrl + Enter.
FaLang translation system by Faboba