Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

ghostfile

My ghost install with dockerfile.

Execution

  • Create a docker machine using dm create.

  • Activate the docker machine and set the docker env variable using docker-machine active and $(docker-machine env)

  • Connect to the docker machine with docker-machine ssh

  • Create the local director for ghost and nginx data:

    sudo mkdir /ghost-files/
    
    sudo mkdir /nginx/ /nginx/logs /nginx/certs /nginx/sites-enabled
    
  • Create the nginx site config:

    sudo vi /nginx/sites-enabled/benjaminjt-ghost
    

    And add the following (press i first!):
    * currently broken

    server {
    listen 0.0.0.0:80;
    server_name http://benjaminjt.com;
    access_log /var/log/nginx/benjmainjt-ghost.com.log;
    
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header HOST $http_host;
        proxy_set_header X-NginX-Proxy true;
    
        proxy_pass http://ghost:2368;
        proxy_redirect off;
    }
    }
    

    Remember to hit esc and enter :x to save.

  • Exit SSH with exit.

  • Create storage container for ghost:

    docker run -v /ghost-files/:/ghost-override \
    --name=ghost-store ubuntu
    
  • Create storage container for nginx:

    docker run -v /nginx/logs:/var/log/nginx \
    -v /nginx/certs:/etc/nginx/certs \
    -v /nginx/sites-enabled:/etc/nginx/sites-enabled \
    --name=nginx-storage ubuntu
    
  • Start the docker ghost container:

    docker run --name ghost-exe --volumes-from ghost-store \
    -d benjaminjt/ghostfile
    
  • Start the nginx container:

    docker run -d -p 80:80 -p 443:443 --link ghost-exe:ghost \
    --volumes-from=nginx-storage --name=nginx nginx
    

Execute Without Nginx

  • Create a docker machine using dm create.

  • Activate the docker machine and set the docker env variable using docker-machine active and $(docker-machine env)

  • Connect to the docker machine with docker-machine ssh

  • Create the local director for ghost and nginx data:

    sudo mkdir /ghost-files/
    
  • Create storage container for ghost:

    docker run -v /ghost-files/:/ghost-override \
    --name=ghost-store ubuntu
    
  • Start the docker ghost container:

    docker run --name ghost-exe -p 80:2368 \
    --volumes-from ghost-store -d benjaminjt/ghostfile
    

To-Do

  • fix nginx config
  • implement config.js created from default-config.js for first run
Docker Pull Command
Owner
benjaminjt
Source Repository