Closed sdgluck closed 6 years ago
@chriscroome @chrislo @olizilla Tagging some folks from other coops. Please all have a look when you get a chance 😃
Thanks for your work on this @sdgluck, I haven't been using the site with Docker so I spent some time today sorting out how to use Ansible to install Docker CE and Docker Compose locally on Debian and then failed to get it working, this is what I did:
git pull
git checkout gulpify
docker-compose up -d
Creating volume "website_theme_vendor" with default driver
Creating volume "website_composer_home" with default driver
Creating volume "website_wordpress_vendor" with default driver
Creating volume "website_theme_node_modules" with default driver
Recreating website_db_1 ...
Recreating website_db_1 ... done
Recreating website_phpmyadmin_1 ...
Recreating website_wordpress_1 ... done
lynx http://localhost:18080/ -head -dump
Looking up localhost:18080
Making HTTP connection to localhost:18080
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost:18080/
This is what I have in the Docker logs:
docker-compose logs wordpress
Attaching to website_wordpress_1
wordpress_1 | Starting up entrypoint script
wordpress_1 | Composer could not find a composer.json file in /var/www/html
wordpress_1 | To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Any idea what I need to do here?
I tried connecting to the container and also downloading the images:
docker-compose exec wordpress /bin/bash
ERROR: No container found for wordpress_1
docker-compose exec assets /download-images.sh --force
ERROR: No container found for assets_1
These are the containers I have running:
docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------
website_assets_1 node Exit 0
website_db_1 docker-entrypoint.sh mysqld Up 0.0.0.0:13306->3306/tcp
website_phpmyadmin_1 /run.sh phpmyadmin Up 0.0.0.0:18081->80/tcp
website_wordpress_1 /entrypoint.sh nginx -g da ... Exit 1
Sorry @chriscroome I didn't write any of the Docker code and have minimal experience of using it. I'm going to CC @mattKendon and @nicksellen to see if they can lend a hand, as our resident Docker wizards!
I've just test run this and it works for me. Dunno what might be causing that for you @chriscroome.
I did see the following deprecation warning (on the front page when I checked the site):
Notice: wpcf7_add_shortcode is deprecated since Contact Form 7 version 4.6! Use wpcf7_add_form_tag instead. in /app/web/app/plugins/contact-form-7/includes/functions.php on line 360
This is from plugin code? Can we somehow hide deprecation warnings on the site itself?
Otherwise, things came up just fine.
Let's gettt ittt meerrgeeeddd. Down with rotting PRs!
Optimistically merging this, thanks for the work @sdgluck!
I've opened https://git.coop/cotech/ansible/issues/7 to follow removing yarn stuff.
Laravel's elixir mix webpack wrapper thing uses an outdated version of
node-sass
which has no longer has a binary available, so was failing to build for me. I moved the build script over togulp
, and updated the Docker stuff accordingly. I thinkgulp
is a stronger candidate for scripting this kind of thing, considering it is more widely used.I have tested these changes on my local via Docker. Everything seems to be in order.
Changes:
package.json
as it contained incorrect information