Renaming / removing files for ease of deploying between all envs
This commit is contained in:
parent
5d180c10c5
commit
32f77e0ae1
61
Dockerfile
61
Dockerfile
|
|
@ -1,61 +0,0 @@
|
||||||
FROM ghcr.io/kzrl/ubuntu:lucid
|
|
||||||
|
|
||||||
# Set environment variables.
|
|
||||||
ENV HOME /root
|
|
||||||
|
|
||||||
# Define working directory.
|
|
||||||
WORKDIR /root
|
|
||||||
|
|
||||||
RUN sed -i 's/archive/old-releases/' /etc/apt/sources.list
|
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get -y upgrade
|
|
||||||
|
|
||||||
# Install apache, PHP, and supplimentary programs. curl and lynx-cur are for debugging the container.
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 libapache2-mod-php5 php5-mysql php5-gd php-pear php-apc php5-curl php5-imap
|
|
||||||
|
|
||||||
# Enable apache mods.
|
|
||||||
#RUN php5enmod openssl
|
|
||||||
RUN a2enmod php5
|
|
||||||
RUN a2enmod rewrite
|
|
||||||
RUN a2enmod headers
|
|
||||||
|
|
||||||
|
|
||||||
# Update the PHP.ini file, enable <? ?> tags and quieten logging.
|
|
||||||
# RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php5/apache2/php.ini
|
|
||||||
#RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php5/apache2/php.ini
|
|
||||||
|
|
||||||
ADD conf/php.ini /etc/php5/apache2/php.ini
|
|
||||||
|
|
||||||
# Manually set up the apache environment variables
|
|
||||||
ENV APACHE_RUN_USER www-data
|
|
||||||
ENV APACHE_RUN_GROUP www-data
|
|
||||||
ENV APACHE_LOG_DIR /var/log/apache2
|
|
||||||
ENV APACHE_LOCK_DIR /var/lock/apache2
|
|
||||||
ENV APACHE_PID_FILE /var/run/apache2.pid
|
|
||||||
|
|
||||||
ARG COMMIT
|
|
||||||
ENV COMMIT_SHA=${COMMIT}
|
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
|
|
||||||
# Update the default apache site with the config we created.
|
|
||||||
ADD conf/apache-vhost.conf /etc/apache2/sites-available/cmc-sales
|
|
||||||
ADD conf/ripmime /bin/ripmime
|
|
||||||
|
|
||||||
RUN chmod +x /bin/ripmime
|
|
||||||
RUN a2dissite 000-default
|
|
||||||
RUN a2ensite cmc-sales
|
|
||||||
|
|
||||||
RUN mkdir -p /var/www/cmc-sales/app/tmp/logs
|
|
||||||
RUN chmod -R 755 /var/www/cmc-sales/app/tmp
|
|
||||||
|
|
||||||
# Copy site into place.
|
|
||||||
ADD . /var/www/cmc-sales
|
|
||||||
RUN chmod +x /var/www/cmc-sales/run_vault.sh
|
|
||||||
RUN chmod +x /var/www/cmc-sales/run_update_invoices.sh
|
|
||||||
|
|
||||||
|
|
||||||
# By default, simply start apache.
|
|
||||||
CMD /usr/sbin/apache2ctl -D FOREGROUND
|
|
||||||
|
|
@ -56,8 +56,8 @@ RUN chmod +x /bin/ripmime \
|
||||||
# Copy site into place.
|
# Copy site into place.
|
||||||
ADD . /var/www/cmc-sales
|
ADD . /var/www/cmc-sales
|
||||||
ADD app/config/database_stg.php /var/www/cmc-sales/app/config/database.php
|
ADD app/config/database_stg.php /var/www/cmc-sales/app/config/database.php
|
||||||
RUN mkdir /var/www/cmc-sales/app/tmp
|
RUN mkdir -p /var/www/cmc-sales/app/tmp
|
||||||
RUN mkdir /var/www/cmc-sales/app/tmp/logs
|
RUN mkdir -p /var/www/cmc-sales/app/tmp/logs
|
||||||
RUN chmod -R 755 /var/www/cmc-sales/app/tmp
|
RUN chmod -R 755 /var/www/cmc-sales/app/tmp
|
||||||
RUN chmod +x /var/www/cmc-sales/run_vault.sh
|
RUN chmod +x /var/www/cmc-sales/run_vault.sh
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@ server {
|
||||||
auth_basic_user_file /etc/nginx/userpasswd;
|
auth_basic_user_file /etc/nginx/userpasswd;
|
||||||
auth_basic "Restricted";
|
auth_basic "Restricted";
|
||||||
location /go/ {
|
location /go/ {
|
||||||
proxy_pass http://cmc-prod-go:8082;
|
proxy_pass http://cmc-go:8080;
|
||||||
proxy_read_timeout 300s;
|
proxy_read_timeout 300s;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
@ -11,7 +11,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://cmc-prod-php:80;
|
proxy_pass http://cmc-php:80;
|
||||||
proxy_read_timeout 300s;
|
proxy_read_timeout 300s;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ services:
|
||||||
cmc-stg-php:
|
cmc-stg-php:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile_stg
|
dockerfile: Dockerfile.stg.php
|
||||||
container_name: cmc-stg-php
|
container_name: cmc-stg-php
|
||||||
environment:
|
environment:
|
||||||
MAIL_HOST: mailpit
|
MAIL_HOST: mailpit
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ services:
|
||||||
cmc-php:
|
cmc-php:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile.stg.php
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
container_name: cmc-php
|
container_name: cmc-php
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
@ -60,7 +60,7 @@ services:
|
||||||
cmc-go:
|
cmc-go:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.go
|
dockerfile: Dockerfile.local.go
|
||||||
container_name: cmc-go
|
container_name: cmc-go
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: db
|
DB_HOST: db
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue