Browse Source

Added git revision to frontpage and moved launching into script

pull/11/head
Julian T 11 months ago
parent
commit
3afa68bbf2
Signed by: jtle <julian@jtle.dk> GPG Key ID: FAC6381CEEAF65FC
3 changed files with 18 additions and 1 deletions
  1. +1
    -1
      Dockerfile
  2. +6
    -0
      includes/footer.php
  3. +11
    -0
      start.sh

+ 1
- 1
Dockerfile View File

@@ -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
- 0
includes/footer.php View File

@@ -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
- 0
start.sh View File

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