Cleaning building file. Adding CI

parent 167f0bed
Pipeline #349 failed with stages
in 1 minute and 33 seconds
image: docker:dind
stages:
- build
- release
variables:
IMAGE_PATH: vfricou/soplanning
CONTAINER_TEST_IMAGE: ${CI_DOCKER_REGISTRY_HOST}/${IMAGE_PATH}:$CI_COMMIT_REF_NAME
CONTAINER_RELEASE_IMAGE: ${CI_DOCKER_REGISTRY_HOST}/${IMAGE_PATH}:latest
CONTAINER_RELEASE_IMAGE_TAG: ${CI_DOCKER_REGISTRY_HOST}/${IMAGE_PATH}:$CI_COMMIT_TAG
before_script:
- docker login -u ${CI_DOCKER_REGISTRY_USER} -p ${CI_DOCKER_REGISTRY_PASS} ${CI_DOCKER_REGISTRY_HOST}
build:
stage: build
script:
- docker build -t $CONTAINER_TEST_IMAGE .
release-image:latest:
stage: release
script:
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
only:
- master
release-image:tags:
stage: release
script:
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE_TAG
- docker push $CONTAINER_RELEASE_IMAGE_TAG
only:
- tags
......@@ -11,14 +11,18 @@ RUN \
apt-get update && \
apt-get -y upgrade && \
apt-get -y install apache2 libapache2-mod-php unzip \
php-mysql php-gd
RUN \
php-mysql php-gd && \
unzip includes.d/soplanning-${SOP_VERSION}.zip && \
mv soplanning/* ${SOP_ROOT} && \
rm ${SOP_ROOT}index.html && \
chown -R www-data: ${SOP_ROOT}
chown -R www-data: ${SOP_ROOT} && \
rm -rf /soplanning && \
cp /includes.d/entrypoint.sh /entrypoint.sh && \
chmod +x /entrypoint.sh && \
apt-get remove --purge unzip && \
rm -rf /var/cache/apt && \
rm -rf /includes.d
RUN \
rm -rf /soplanning
\ No newline at end of file
EXPOSE 80
ENTRYPOINT [ "/entrypoint.sh" ]
\ No newline at end of file
......@@ -2,9 +2,9 @@ version: '3.6'
services:
app:
image: soplanning:latest
image: docker.fricouv.eu/vfricou/soplanning:latest
ports:
- 8081:80
- 80:80
depends_on:
- db
db:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment