Merge branch 'master' of ssh://gitlab.cabillot.eu:2224/www/dl

Conflicts:
	Dockerfile
This commit is contained in:
Julien Cabillot 2017-11-01 17:29:39 +01:00 committed by root
commit af5ba3b39e
2 changed files with 30 additions and 5 deletions

23
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,23 @@
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
build-master:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
build:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master

View File

@ -1,19 +1,21 @@
FROM "php:apache"
WORKDIR "/var/www"
RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \
sed -i'' 's/^<VirtualHost \*:80>$/<VirtualHost *:8080>/' '/etc/apache2/sites-enabled/000-default.conf' && \
apt-get update && \
apt-get -y install libpng12-dev && \
apt-get -y install libpng12-dev git && \
docker-php-ext-install gd && \
apt-get clean all && \
a2enmod headers && \
rm -rf "/var/www/html" && \
git clone "https://github.com/blueimp/jQuery-File-Upload.git" "html" && \
rm -rf "/usr/share/doc/*" \
"/var/cache/*" \
"/var/lib/apt/lists/*" \
"/var/www/html"
"/var/lib/apt/lists/*"
COPY "src" "/var/www/html"
RUN chown -R "www-data":"www-data" "/var/www/html/"
RUN chown -R "www-data":"www-data" "/var/www/html"
USER "www-data"