diff --git a/.drone.yml b/.drone.yml index 9633187..e2fa448 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,6 +16,13 @@ steps: sonar_token: from_secret: sonar_token + - name: rewrite-urls + image: busybox:latest + commands: + - find . -type f -exec sed -i -r "s@(href|src)=\"/@\1=\"$${PLUGIN_CONTAINER_PATH}@g" {} + + settings: + container_path: /containers/clementfreville2-drone-health/ + - name: docker-build-and-push image: plugins/docker settings: @@ -27,6 +34,8 @@ steps: from_secret: SECRET_REGISTRY_USERNAME password: from_secret: SECRET_REGISTRY_PASSWORD + depends_on: + - rewrite-urls - name: deploy-container image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest @@ -35,7 +44,5 @@ steps: CONTAINERNAME: drone-health COMMAND: create OVERWRITE: true - # Don't add a trailing slash here - CODEFIRST_CLIENTDRONE_ENV_CONTAINER_PATH: /containers/clementfreville2-drone-health depends_on: - docker-build-and-push diff --git a/docker/Dockerfile b/docker/Dockerfile index 655dd3e..6fd0d48 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,3 @@ FROM php:8.2-apache -COPY docker/vhost.conf /etc/apache2/sites-available/000-default.conf COPY . /var/www/html/ diff --git a/docker/vhost.conf b/docker/vhost.conf deleted file mode 100644 index a47acc8..0000000 --- a/docker/vhost.conf +++ /dev/null @@ -1,6 +0,0 @@ - - DocumentRoot /var/www/html - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - Alias ${CONTAINER_PATH} /var/www/html/ - diff --git a/index.html b/index.html index 51f1332..1c191db 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ drone-health - One incredible styled html page - + @@ -28,7 +28,7 @@