mardi 4 juillet 2017

Drupal Nginx Docker

have some problems, with the that stack I've typed above.

So, the purpose:
Deploy alredy installed(!) drupal8, on NGINX with Docker, on 9090 port! Drupal was installed on Ubuntu machine, manually on NGINX before.

So, the problem:
When I build my image, and after try to run Docker container, I get in browser 502(Bad Gateway), and have interesting specific - when I run it on 80 port, it work, if I can say so, I mean I get 502 in browser, well, if I tried to run on 9090 port(both, manually and with docker) I get ERR_CONNECTION_REFUSED. It's all happens even when I try to deploy usual Drupal(not already installed).

My environment is:

Ubuntu 16.04 machine on DigitalOcean cloud.

And this is my Dockerfile:

FROM ubuntu:latest 
MAINTAINERVadim Rozhkalns <vadim.rozhkalns@gmail.com>

# Download and install all necessary dependencies 
RUN apt-get -y update RUN apt-get -y install nginx php-fpm

# NGINX site conf 
COPY ./drupal.conf /etc/nginx/sites-available/

# Symlink 
RUN ln -s /etc/nginx/sites-available/drupal.conf /etc/nginx/sites-enabled/

# Retrieve drupal 
RUN rm -rf /var/www/  
RUN mkdir -p /var/www/drupal 
COPY drupal /var/www/drupal 
RUN cd /var/www/drupal/sites/default
RUN chmod a + w /var/www/drupal/sites/default

# Port expose 
EXPOSE 9090

# Start 
CMD ["nginx", "-g", "daemon off;"]

Thanks a lot in advance!




Aucun commentaire:

Enregistrer un commentaire