Skip to content

Commit e53595e

Browse files
Merge pull request #5 from cevans-montala/main
Added entrypoint.sh script to start Apache and cron and made Dockerfile run it after building.
2 parents ba0070c + 7102ce9 commit e53595e

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ ADD cronjob /etc/cron.daily/resourcespace
4949
WORKDIR /var/www/html
5050

5151
RUN rm -f index.html \
52-
&& svn co -q https://svn.resourcespace.com/svn/rs/releases/10.5 . \
52+
&& svn co -q https://svn.resourcespace.com/svn/rs/releases/10.6 . \
5353
&& mkdir -p filestore \
5454
&& chmod 777 filestore \
5555
&& chmod -R 777 include/
56+
5657

57-
CMD apachectl -D FOREGROUND
58+
# Copy custom entrypoint script
59+
COPY entrypoint.sh /entrypoint.sh
60+
RUN chmod +x /entrypoint.sh
61+
62+
# Start both cron and Apache
63+
CMD ["/entrypoint.sh"]

config.php

Whitespace-only changes.

docker-compose.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ services:
66
depends_on:
77
- mariadb
88
volumes:
9-
- include:/var/www/html/include
109
- filestore:/var/www/html/filestore
11-
- ./testdir:/srv/storage/testdir
10+
- ./config.php:/var/www/html/include/config.php
1211
networks:
1312
- frontend
1413
- backend

entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Start cron service
4+
service cron start
5+
6+
# Ensure daily cron jobs are executable
7+
chmod +x /etc/cron.daily/*
8+
9+
# Start Apache in the foreground (keeps the container alive)
10+
apachectl -D FOREGROUND

0 commit comments

Comments
 (0)