Dockerize Automation

This commit is contained in:
Ben van Hartingsveldt 2025-01-16 10:45:41 +01:00
parent f160a8b14c
commit 62c6978139
No known key found for this signature in database
GPG key ID: 261AA214130CE7AB

17
automation/Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM phpswoole/swoole:php8.3-alpine
WORKDIR /opt/registry/automation
COPY . .
RUN composer install
RUN mv /opt/registry/automation/config.php.dist /opt/registry/automation/config.php
RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/automation/config.php
RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/automation/config.php
VOLUME /var/log/namingo
RUN echo -e "*\t*\t*\t*\t*\t/usr/bin/php /opt/registry/automation/cron.php 1>> /dev/null 2>&1" >> /var/spool/cron/crontabs/root
CMD ["crond"]