-
Notifications
You must be signed in to change notification settings - Fork 7
Dev #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Dev #3
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
89a7f25
Reverting sendmail support
angeldanielboscan 7d4f2ce
Removing "/var/www/sites/default/files" to avoid mount conflicts
angeldanielboscan d787941
apt-get refactoring
angeldanielboscan 4d30ad5
Merge pull request #1 from devsu/dev
c3s4r 4ba9265
Removing Unnecesary package memcached
angeldanielboscan 9c1eb92
Readding cron.sh to Dockerfile, removing unnecessary msmtp support fr…
angeldanielboscan b75c4df
Changing supervisor.conf to start php5-fpm in foreground
angeldanielboscan 517fb61
Adding sendmail as a foreground process to supervisor
angeldanielboscan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,28 +8,40 @@ RUN locale-gen en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
ENV SMTP_HOST smtp.gmail.com | ||
ENV SMTP_PORT 587 | ||
ENV SMTP_FROMNAME My Name | ||
ENV SMTP_USERNAME [email protected] | ||
ENV SMTP_PASSWORD secret | ||
|
||
# Update system | ||
RUN apt-get update && apt-get dist-upgrade -y | ||
|
||
# Prevent restarts when installing | ||
RUN echo '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d | ||
|
||
# Basic packages | ||
RUN apt-get -y install php5-fpm php5-mysql php-apc php5-imagick php5-imap php5-mcrypt php5-curl php5-cli php5-gd php5-pgsql php5-sqlite php5-common php-pear curl php5-json php5-redis php5-memcache | ||
RUN apt-get -y install nginx-extras git curl supervisor | ||
RUN apt-get -y install msmtp msmtp-mta | ||
# Update System & Basic packages | ||
|
||
RUN apt-get update \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get -y install php5-fpm \ | ||
php5-mysql \ | ||
php-apc php5-imagick \ | ||
php5-imap \ | ||
php5-mcrypt \ | ||
php5-curl \ | ||
php5-cli \ | ||
php5-gd \ | ||
php5-pgsql \ | ||
php5-sqlite \ | ||
php5-common \ | ||
php-pear curl \ | ||
php5-json \ | ||
php5-redis \ | ||
php5-memcache \ | ||
nginx-extras \ | ||
git \ | ||
supervisor \ | ||
ca-certificates \ | ||
openssl \ | ||
sendmail --no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN php5enmod mcrypt | ||
|
||
RUN /usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php | ||
RUN /bin/mv composer.phar /usr/local/bin/composer | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Install Composer and Drush | ||
RUN /usr/local/bin/composer self-update | ||
|
@@ -44,38 +56,21 @@ RUN chown -R www-data:www-data /var/www | |
|
||
EXPOSE 80 | ||
WORKDIR /var/www | ||
VOLUME ["/var/www/sites/default/files"] | ||
CMD ["/usr/bin/supervisord", "-n"] | ||
|
||
# Startup script | ||
# This startup script wll configure nginx | ||
ADD ./startup.sh /opt/startup.sh | ||
RUN chmod +x /opt/startup.sh | ||
|
||
ADD ./mail.sh /opt/mail.sh | ||
RUN chmod +x /opt/mail.sh | ||
|
||
ADD ./cron.sh /opt/cron.sh | ||
RUN chmod +x /opt/cron.sh | ||
|
||
# We want it empty | ||
RUN touch /etc/msmtprc | ||
RUN chgrp mail /etc/msmtprc | ||
RUN chmod 660 /etc/msmtprc | ||
RUN touch /var/log/supervisor/msmtp.log | ||
RUN chgrp mail /var/log/supervisor/msmtp.log | ||
RUN chmod 660 /var/log/supervisor/msmtp.log | ||
RUN adduser www-data mail | ||
|
||
RUN rm /usr/sbin/sendmail | ||
RUN rm /usr/lib/sendmail | ||
|
||
RUN ln -s /usr/bin/msmtp /usr/sbin/sendmail | ||
RUN ln -s /usr/bin/msmtp /usr/bin/sendmail | ||
RUN ln -s /usr/bin/msmtp /usr/lib/sendmail | ||
|
||
RUN mkdir -p /var/cache/nginx/microcache | ||
|
||
# Avoid sendmail starting as a service | ||
RUN update-rc.d sendmail disable | ||
|
||
### Add configuration files | ||
# Supervisor | ||
ADD ./config/supervisor/supervisord-nginx.conf /etc/supervisor/conf.d/supervisord-nginx.conf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/bash | ||
|
||
/opt/startup.sh | ||
/opt/mail.sh | ||
/usr/local/bin/drush cron |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removal of unnecessary files