Skip to content

Commit 719ea19

Browse files
refactor: Consolidate supervisord configurations and streamline Dockerfiles for improved service management. (#116)
1 parent 228d56e commit 719ea19

File tree

17 files changed

+25
-80
lines changed

17 files changed

+25
-80
lines changed

docker/apache/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,11 @@ RUN usermod -u ${USER_ID} www-data && groupmod -g ${GROUP_ID} www-data
4141
RUN mkdir -p /var/www/.composer/cache /var/www/.npm && \
4242
chown -R www-data:www-data /var/www/.composer /var/www/.npm
4343

44-
# Copy supervisord config
45-
COPY docker/apache/supervisord/supervisord.conf /etc/supervisor/supervisord.conf
46-
4744
# Copy supervisord program configs
48-
COPY docker/apache/supervisord/conf.d/apache2.conf /etc/supervisor/conf.d/apache2.conf
45+
COPY docker/supervisord/conf.d/apache2.conf /etc/supervisor/conf.d/apache2.conf
4946

5047
# Copy queue worker config uncommented for use with yii2-queue
51-
#COPY docker/apache/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
48+
#COPY docker/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
5249

5350
# Copy scripts
5451
COPY docker/init.sh /usr/local/bin/init.sh

docker/apache/supervisord/conf.d/queue.conf

Lines changed: 0 additions & 9 deletions
This file was deleted.

docker/apache/supervisord/log/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

docker/apache/supervisord/supervisord.conf

Lines changed: 0 additions & 14 deletions
This file was deleted.

docker/frankenphp/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,11 @@ RUN usermod -u ${USER_ID} www-data && groupmod -g ${GROUP_ID} www-data
5151
RUN mkdir -p /var/www/.composer/cache /var/www/.npm && \
5252
chown -R www-data:www-data /var/www/.composer /var/www/.npm
5353

54-
# Copy supervisord config
55-
COPY docker/frankenphp/supervisord/supervisord.conf /etc/supervisor/supervisord.conf
56-
5754
# Copy supervisord program configs
58-
COPY docker/frankenphp/supervisord/conf.d/frankenphp.conf /etc/supervisor/conf.d/frankenphp.conf
55+
COPY docker/supervisord/conf.d/frankenphp.conf /etc/supervisor/conf.d/frankenphp.conf
5956

6057
# Copy queue worker config uncommented for use with yii2-queue
61-
#COPY docker/frankenphp/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
58+
#COPY docker/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
6259

6360
# Copy scripts
6461
COPY docker/init.sh /usr/local/bin/init.sh

docker/frankenphp/supervisord/log/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

docker/frankenphp/supervisord/supervisord.conf

Lines changed: 0 additions & 15 deletions
This file was deleted.

docker/init.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ if [ -f "/app/composer.json" ] && [ ! -d "/app/vendor" ]; then
8484
echo -e "${GREEN}✓ Composer dependencies installed successfully${NC}"
8585
fi
8686

87+
# Copy supervisord configuration
88+
echo -e "${YELLOW}Configuring supervisord...${NC}"
89+
90+
if [ -f "/app/docker/supervisord/supervisord.conf" ]; then
91+
cp /app/docker/supervisord/supervisord.conf /etc/supervisor/supervisord.conf
92+
echo -e "${GREEN}✓ Supervisord configuration copied successfully${NC}"
93+
else
94+
echo -e "${RED}✗ Error: Supervisord configuration file not found${NC}"
95+
exit 1
96+
fi
97+
8798
echo -e "${GREEN}Starting supervisord...${NC}"
8899

89100
# Start supervisord

docker/nginx/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,12 @@ RUN usermod -u ${USER_ID} www-data && groupmod -g ${GROUP_ID} www-data
3636
RUN mkdir -p /var/www/.composer/cache /var/www/.npm && \
3737
chown -R www-data:www-data /var/www/.composer /var/www/.npm
3838

39-
# Copy supervisord config
40-
COPY docker/nginx/supervisord/supervisord.conf /etc/supervisor/supervisord.conf
41-
4239
# Copy supervisord program configs
43-
COPY docker/nginx/supervisord/conf.d/nginx.conf /etc/supervisor/conf.d/nginx.conf
44-
COPY docker/nginx/supervisord/conf.d/php-fpm.conf /etc/supervisor/conf.d/php-fpm.conf
40+
COPY docker/supervisord/conf.d/nginx.conf /etc/supervisor/conf.d/nginx.conf
41+
COPY docker/supervisord/conf.d/php-fpm.conf /etc/supervisor/conf.d/php-fpm.conf
4542

4643
# Copy queue worker config uncommented for use with yii2-queue
47-
#COPY docker/nginx/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
44+
#COPY docker/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf
4845

4946
# Copy scripts
5047
COPY docker/init.sh /usr/local/bin/init.sh

docker/nginx/supervisord/conf.d/queue.conf

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)