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: sonar_token:
from_secret: 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 - name: docker-build-and-push
image: plugins/docker image: plugins/docker
settings: settings:
@ -27,6 +34,8 @@ steps:
from_secret: SECRET_REGISTRY_USERNAME from_secret: SECRET_REGISTRY_USERNAME
password: password:
from_secret: SECRET_REGISTRY_PASSWORD from_secret: SECRET_REGISTRY_PASSWORD
depends_on:
- rewrite-urls
- name: deploy-container - name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
@ -35,7 +44,5 @@ steps:
CONTAINERNAME: drone-health CONTAINERNAME: drone-health
COMMAND: create COMMAND: create
OVERWRITE: true OVERWRITE: true
# Don't add a trailing slash here
CODEFIRST_CLIENTDRONE_ENV_CONTAINER_PATH: /containers/clementfreville2-drone-health
depends_on: depends_on:
- docker-build-and-push - docker-build-and-push

@ -1,4 +1,3 @@
FROM php:8.2-apache FROM php:8.2-apache
COPY docker/vhost.conf /etc/apache2/sites-available/000-default.conf
COPY . /var/www/html/ 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"> <html lang="en">
<head> <head>
<title>drone-health - One incredible styled html page</title> <title>drone-health - One incredible styled html page</title>
<link rel="stylesheet" href="mycoolstyle.css"> <link rel="stylesheet" href="/mycoolstyle.css">
</head> </head>
<body> <body>
@ -28,7 +28,7 @@
<footer> <footer>
<address>Template made in 2022<br> <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> </a></address>
</footer> </footer>

Loading…
Cancel
Save