Re-add url rewriting via sed

master
Clément FRÉVILLE 2 years ago
parent 49d1a55c9b
commit 3a0fa16764

@ -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

@ -1,4 +1,3 @@
FROM php:8.2-apache
COPY docker/vhost.conf /etc/apache2/sites-available/000-default.conf
COPY . /var/www/html/

@ -1,6 +0,0 @@
<VirtualHost *:80>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias ${CONTAINER_PATH} /var/www/html/
</VirtualHost>

@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>drone-health - One incredible styled html page</title>
<link rel="stylesheet" href="mycoolstyle.css">
<link rel="stylesheet" href="/mycoolstyle.css">
</head>
<body>
@ -28,7 +28,7 @@
<footer>
<address>Template made in 2022<br>
with Code#0 <a href="https://codefirst.iut.uca.fr/home"><img src="images/CodeFirstLogo.png" alt="Code#0" height="40px"/>
with Code#0 <a href="https://codefirst.iut.uca.fr/home"><img src="/images/CodeFirstLogo.png" alt="Code#0" height="40px"/>
</a></address>
</footer>

Loading…
Cancel
Save