Update Dockerfile
Browse files- Dockerfile +0 -16
Dockerfile
CHANGED
|
@@ -154,27 +154,11 @@ COPY --chown=$UID:$GID --from=build /app/package.json /app/package.json
|
|
| 154 |
COPY --chown=$UID:$GID --from=build /app/backend ./
|
| 155 |
COPY --chown=$UID:$GID start.sh ./
|
| 156 |
|
| 157 |
-
# Install cron and other required packages
|
| 158 |
-
RUN apt-get update && apt-get install -y cron git && rm -rf /var/lib/apt/lists/*
|
| 159 |
-
|
| 160 |
# Add the cron job script
|
| 161 |
COPY --chown=$UID:$GID cron-job.sh /app/cron-job.sh
|
| 162 |
RUN chmod 777 /app/cron-job.sh
|
| 163 |
|
| 164 |
|
| 165 |
-
# Create a crontab file and add it to the cron directory
|
| 166 |
-
RUN echo "* * * * * /app/cron-job.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/webui-cron
|
| 167 |
-
|
| 168 |
-
# Give execution rights on the cron job
|
| 169 |
-
RUN chmod 777 /etc/cron.d/webui-cron
|
| 170 |
-
RUN chmod 777 /var/run
|
| 171 |
-
RUN chmod 777 /usr/sbin/cron
|
| 172 |
-
RUN touch /etc/crontab /etc/cron.*/*
|
| 173 |
-
|
| 174 |
-
# Apply the cron job
|
| 175 |
-
RUN crontab /etc/cron.d/webui-cron
|
| 176 |
-
|
| 177 |
-
|
| 178 |
EXPOSE 8080
|
| 179 |
|
| 180 |
HEALTHCHECK CMD curl --silent --fail http://localhost:8080/health | jq -e '.status == true' || exit 1
|
|
|
|
| 154 |
COPY --chown=$UID:$GID --from=build /app/backend ./
|
| 155 |
COPY --chown=$UID:$GID start.sh ./
|
| 156 |
|
|
|
|
|
|
|
|
|
|
| 157 |
# Add the cron job script
|
| 158 |
COPY --chown=$UID:$GID cron-job.sh /app/cron-job.sh
|
| 159 |
RUN chmod 777 /app/cron-job.sh
|
| 160 |
|
| 161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
EXPOSE 8080
|
| 163 |
|
| 164 |
HEALTHCHECK CMD curl --silent --fail http://localhost:8080/health | jq -e '.status == true' || exit 1
|