Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize project #202

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions automation/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM phpswoole/swoole:php8.3-alpine

RUN apk add gmp
RUN apk add gmp-dev

RUN docker-php-ext-install gmp
RUN docker-php-ext-install mysqli

RUN apk del gmp-dev

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"]
14 changes: 14 additions & 0 deletions cp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM php:8.3-alpine

WORKDIR /var/www/cp

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

COPY . .

RUN composer install

VOLUME /var/log/namingo

CMD ["php-fpm","-D"]
15 changes: 15 additions & 0 deletions das/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM phpswoole/swoole:php8.3-alpine

WORKDIR /opt/registry/das

COPY . .

RUN composer install

RUN mv /opt/registry/das/config.php.dist /opt/registry/das/config.php
RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/das/config.php
RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/das/config.php

VOLUME /var/log/namingo

CMD ["php","/opt/registry/das/start_das.php"]
14 changes: 14 additions & 0 deletions epp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM phpswoole/swoole:php8.3-alpine

WORKDIR /opt/registry/epp

COPY . .

RUN composer install
RUN mv /opt/registry/epp/config.php.dist /opt/registry/epp/config.php
RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/epp/config.php
RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/epp/config.php

VOLUME /var/log/namingo

CMD ["php","/opt/registry/epp/start_epp.php"]
15 changes: 15 additions & 0 deletions rdap/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM phpswoole/swoole:php8.3-alpine

WORKDIR /opt/registry/rdap

COPY . .

RUN composer install

RUN mv /opt/registry/rdap/config.php.dist /opt/registry/rdap/config.php
RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/rdap/config.php
RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/rdap/config.php

VOLUME /var/log/namingo

CMD ["php","/opt/registry/rdap/start_rdap.php"]
15 changes: 15 additions & 0 deletions whois/port43/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM phpswoole/swoole:php8.3-alpine

WORKDIR /opt/registry/whois/port43

COPY . .

RUN composer install

RUN mv /opt/registry/whois/port43/config.php.dist /opt/registry/whois/port43/config.php
RUN sed -i "s|'db_username' => 'your_username'|'db_username' => '$DB_USER'|g" /opt/registry/whois/port43/config.php
RUN sed -i "s|'db_password' => 'your_password'|'db_password' => '$DB_PASSWORD'|g" /opt/registry/whois/port43/config.php

VOLUME /var/log/namingo

CMD ["php","/opt/registry/whois/port43/start_whois.php"]
18 changes: 18 additions & 0 deletions whois/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM php:8.3-alpine

WORKDIR /var/www/whois

COPY . .

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

RUN composer install

RUN mv /var/www/whois/config.php.dist /var/www/whois/config.php
RUN sed -i "s|'whois_url' => '.*'|'whois_url' => 'whois.${REGISTRY_DOMAIN}'|" /var/www/whois/config.php
RUN sed -i "s|'rdap_url' => '.*'|'rdap_url' => 'rdap.${REGISTRY_DOMAIN}'|" /var/www/whois/config.php

VOLUME /var/log/namingo

CMD ["php-fpm","-D"]