Revision 1571:4c2b25b7e85f extra/soundsoftware
| extra/soundsoftware/dockertest/Dockerfile | ||
|---|---|---|
| 62 | 62 |
WORKDIR /var/www/code |
| 63 | 63 |
|
| 64 | 64 |
|
| 65 |
# Set up Apache config and webapp database config (todo: insert variables)
|
|
| 65 |
# Set up database config (todo: insert variables) |
|
| 66 | 66 |
|
| 67 |
RUN cp extra/soundsoftware/dockertest/code.conf /etc/apache2/sites-available/ |
|
| 68 | 67 |
RUN cp extra/soundsoftware/dockertest/database.yml config/database.yml |
| 69 | 68 |
|
| 70 | 69 |
|
| ... | ... | |
| 77 | 76 |
# Import Postgres database from postgres-dumpall file |
| 78 | 77 |
|
| 79 | 78 |
RUN chown postgres postgres-dumpall |
| 80 |
RUN /etc/init.d/postgresql start && \ |
|
| 81 |
sudo -u postgres psql -f postgres-dumpall postgres |
|
| 79 |
RUN /etc/init.d/postgresql start && sudo -u postgres psql -f postgres-dumpall postgres |
|
| 82 | 80 |
|
| 83 | 81 |
|
| 84 | 82 |
# Install Perl auth module for Hg access |
| ... | ... | |
| 87 | 85 |
RUN cp extra/soundsoftware/SoundSoftware.pm /usr/local/lib/site_perl/Apache/Authn/ |
| 88 | 86 |
|
| 89 | 87 |
|
| 90 |
# Enable site for Apache
|
|
| 88 |
# Set up Apache config (todo: insert variables)
|
|
| 91 | 89 |
|
| 90 |
RUN rm -f /etc/apache2/sites-enabled/000-default.conf |
|
| 91 |
|
|
| 92 |
RUN cp extra/soundsoftware/dockertest/passenger.conf /etc/apache2/mods-available/ |
|
| 93 |
RUN cp extra/soundsoftware/dockertest/passenger.load /etc/apache2/mods-available/ |
|
| 94 |
RUN cp extra/soundsoftware/dockertest/perl.conf /etc/apache2/mods-available/ |
|
| 95 |
|
|
| 96 |
RUN ln -s ../mods-available/passenger.conf /etc/apache2/mods-enabled/ |
|
| 97 |
RUN ln -s ../mods-available/passenger.load /etc/apache2/mods-enabled/ |
|
| 98 |
RUN ln -s ../mods-available/perl.conf /etc/apache2/mods-enabled/ |
|
| 99 |
RUN ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/ |
|
| 100 |
RUN ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled/ |
|
| 101 |
|
|
| 102 |
RUN cp extra/soundsoftware/dockertest/code.conf /etc/apache2/sites-available/ |
|
| 92 | 103 |
RUN ln -s ../sites-available/code.conf /etc/apache2/sites-enabled/10-code.conf |
| 104 |
|
|
| 105 |
|
|
| 106 |
# Start Apache |
|
| 107 |
|
|
| 93 | 108 |
RUN apache2ctl configtest |
| 109 |
EXPOSE 80 |
|
| 110 |
CMD apache2ctl -D FOREGROUND |
|
| 111 |
|
|
| extra/soundsoftware/dockertest/code.conf | ||
|---|---|---|
| 14 | 14 |
PassengerMaxRequests 50000 |
| 15 | 15 |
PassengerStatThrottleRate 5 |
| 16 | 16 |
PassengerStartTimeout 60 |
| 17 |
PassengerFriendlyErrorPages off
|
|
| 17 |
PassengerFriendlyErrorPages on
|
|
| 18 | 18 |
RailsSpawnMethod smart |
| 19 | 19 |
ExpiresDefault "access plus 1 minute" |
| 20 | 20 |
|
| extra/soundsoftware/dockertest/passenger.conf | ||
|---|---|---|
| 1 |
PassengerMaxPoolSize 60 |
|
| 2 |
|
|
| extra/soundsoftware/dockertest/passenger.load | ||
|---|---|---|
| 1 |
LoadModule passenger_module /var/lib/gems/2.3.0/gems/passenger-4.0.60/buildout/apache2/mod_passenger.so |
|
| 2 |
PassengerRoot /var/lib/gems/2.3.0/gems/passenger-4.0.60 |
|
| 3 |
PassengerDefaultRuby /usr/bin/ruby2.3 |
|
| extra/soundsoftware/dockertest/perl.conf | ||
|---|---|---|
| 1 |
# Apache::DBI is supposed to be a transparent replacement for Perl DBI with |
|
| 2 |
# better performance when multiple connections are made with common DSN, user |
|
| 3 |
# and password |
|
| 4 |
PerlModule Apache::DBI |
|
| extra/soundsoftware/dockertest/start.sh | ||
|---|---|---|
| 11 | 11 |
dockertag="cannam/soundsoftware-site" |
| 12 | 12 |
|
| 13 | 13 |
sudo docker build -t "$dockertag" -f "$dockerdir/Dockerfile" . |
| 14 |
sudo docker run -p 8080:80 -d "$dockertag" |
|
| 14 | 15 |
|
Also available in: Unified diff