phase2 / generator-outrigger-drupal

Yeoman generator that weaves together Outrigger with other best-in-class tools for your Drupal project.
http://outrigger.sh
MIT License
6 stars 7 forks source link

Create a Dockerfile to facilitate deployment image creation #84

Open grayside opened 7 years ago

grayside commented 7 years ago

This is a start on some notes towards add a Dockerfile to the root of the repo which can be used to generate a production-ready image holding the application code.

.dockerignore

**.temp
**.log
build/**
node_modules/**
vendor/**

Dockerfile

FROM outrigger/build:php70 as builder
COPY . /var/www
RUN cd /var/www && \ 
  NPM_CONFIG_LOGLEVEL=error npm install && \
  grunt --timer && \
  // Reshape as a contained deliverable without symlinks.
  // @TODO currently this strips the symlinks, it is not crafting the operational codebase yet.
  rysnc -ahWL --no-l --chmod=Du+rwx /var/www/build/html /opt/deploy

FROM outrigger/apache-php:php70
COPY --from=builder /opt/deploy /var/www/html