Browse Source

Added git revision to frontpage and moved launching into script

pull/11/head
Julian T 2 years ago
parent
commit
3afa68bbf2
Signed by: jtle GPG Key ID: FAC6381CEEAF65FC
  1. 2
      Dockerfile
  2. 6
      includes/footer.php
  3. 11
      start.sh

2
Dockerfile

@ -26,4 +26,4 @@ COPY ./ /www/
RUN /bin/sh -c "cd /www/; /bin/sh ./pacman.sh"
RUN rm /www/default.conf /www/Dockerfile
CMD php-fpm7 -D && nginx -g 'daemon off;'
ENTRYPOINT ["sh", "/www/start.sh"]

6
includes/footer.php

@ -11,6 +11,12 @@
<a class="item" href="/about/#contact">
Kontakt os
</a>
<?php
$git_revision = file_get_contents("/var/git_rev.env");
?>
<a class="item" href="https://gitea.fricloud.dk/fricloud-dev/fricloud-ansible/commit/<?php echo $git_revision?>">
<?php echo $git_revision?>
</a>
</div>
</div>
</div>

11
start.sh

@ -0,0 +1,11 @@
#!/usr/bin/env sh
# Create revision file to be read by php
echo $GIT_REVISION > /var/git_rev.env
# Run php-fpm
php-fpm7 -D
# And nginx
nginx -g 'daemon off;'
Loading…
Cancel
Save