-
Notifications
You must be signed in to change notification settings - Fork 6
Standardize Docker build context and add InvoicePlane banner to all interactive containers #3
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7be8c6d
Initial plan
Copilot c9980b4
Fix Docker COPY paths for invoiceplane-banner.sh
Copilot 8388478
Add documentation for banner file maintenance
Copilot 2653533
Refactor to DRY: Use single banner file with updated build context
Copilot 14857e6
Add InvoicePlane banner to nginx and php-worker containers
Copilot 1dae740
Apply suggestions from code review
nielsdrost7 d2292f7
Standardize build context and add line ending normalization
Copilot ed3d71e
Update .docker/nginx/Dockerfile
nielsdrost7 daca51d
Update .docker/php-worker/Dockerfile
nielsdrost7 1e6264d
Replace ADD with COPY for startup.sh in Dockerfile
nielsdrost7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ LABEL maintainer="Mahmoud Zalt <[email protected]>" | |
| ARG TZ=UTC | ||
| ENV TZ ${TZ} | ||
| RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/ | ||
| COPY my.cnf /etc/mysql/my.cnf | ||
| COPY mariadb/my.cnf /etc/mysql/my.cnf | ||
|
|
||
| RUN chmod -R 644 /etc/mysql/my.cnf | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ FROM nginx:alpine | |
|
|
||
| LABEL maintainer="Mahmoud Zalt <[email protected]>" | ||
|
|
||
| COPY nginx.conf /etc/nginx/ | ||
| COPY nginx/nginx.conf /etc/nginx/ | ||
|
|
||
| RUN apk update \ | ||
| && apk upgrade \ | ||
|
|
@@ -24,8 +24,35 @@ RUN touch /var/log/messages | |
| RUN echo "upstream php-upstream { server ${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}; }" > /etc/nginx/conf.d/upstream.conf \ | ||
| && rm /etc/nginx/conf.d/default.conf | ||
|
|
||
| ADD ./startup.sh /opt/startup.sh | ||
| COPY nginx/startup.sh /opt/startup.sh | ||
| RUN sed -i 's/\r//g' /opt/startup.sh | ||
|
|
||
| # Add InvoicePlane banner to bash profile | ||
| COPY invoiceplane-banner.sh /root/invoiceplane-banner.sh | ||
| RUN sed -i 's/\r//g' /root/invoiceplane-banner.sh && \ | ||
| chmod +x /root/invoiceplane-banner.sh && \ | ||
| echo "" >> /root/.bashrc && \ | ||
| echo "# Set container type for banner" >> /root/.bashrc && \ | ||
| echo "export CONTAINER_TYPE='Nginx Container'" >> /root/.bashrc && \ | ||
| echo "# Load InvoicePlane Banner" >> /root/.bashrc && \ | ||
| echo "if [ -f ~/invoiceplane-banner.sh ]; then" >> /root/.bashrc && \ | ||
| echo " source ~/invoiceplane-banner.sh" >> /root/.bashrc && \ | ||
| echo "fi" >> /root/.bashrc && \ | ||
| # Also add banner for www-data user \ | ||
| mkdir -p /home/www-data && \ | ||
| cp /root/invoiceplane-banner.sh /home/www-data/invoiceplane-banner.sh && \ | ||
| chown www-data:www-data /home/www-data/invoiceplane-banner.sh && \ | ||
| chmod +x /home/www-data/invoiceplane-banner.sh && \ | ||
| touch /home/www-data/.bashrc && \ | ||
| chown www-data:www-data /home/www-data/.bashrc && \ | ||
| echo "" >> /home/www-data/.bashrc && \ | ||
| echo "# Set container type for banner" >> /home/www-data/.bashrc && \ | ||
| echo "export CONTAINER_TYPE='Nginx Container'" >> /home/www-data/.bashrc && \ | ||
| echo "# Load InvoicePlane Banner" >> /home/www-data/.bashrc && \ | ||
| echo "if [ -f ~/invoiceplane-banner.sh ]; then" >> /home/www-data/.bashrc && \ | ||
| echo " source ~/invoiceplane-banner.sh" >> /home/www-data/.bashrc && \ | ||
| echo "fi" >> /home/www-data/.bashrc | ||
|
|
||
| CMD ["/bin/bash", "/opt/startup.sh"] | ||
|
|
||
| EXPOSE 80 81 443 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| FROM redis:alpine | ||
| WORKDIR /redis | ||
| COPY redis.conf /usr/local/etc/redis/redis.conf | ||
| COPY init.sh ./ | ||
| COPY redis/redis.conf /usr/local/etc/redis/redis.conf | ||
| COPY redis/init.sh ./ | ||
| RUN chmod +x init.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.