-
Notifications
You must be signed in to change notification settings - Fork 10
Add Docker setup and CI/CD improvements #107
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
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5ab5926
dev version
tatevikg1 0e0d32d
Add docker
tatevikg1 e0bf45d
Update port
tatevikg1 984621d
Add: gitattributes file
tatevikg1 9b36d9c
Fix: github pipeline
tatevikg1 3c57948
Add postgres
tatevikg1 0870728
Fix missing web-frontend
tatevikg1 e1d04cb
CodeRabbit config
tatevikg1 f6fa057
Use main branches
tatevikg1 73c7e1b
After review 0
tatevikg1 b00b3b1
Env
tatevikg1 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| language: "en-US" | ||
| reviews: | ||
| profile: "chill" | ||
| high_level_summary: true | ||
| auto_review: | ||
| enabled: true | ||
| base_branches: | ||
| - ".*" | ||
| drafts: false |
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Docker build context exclusions | ||
| .git | ||
| .gitignore | ||
| .github | ||
| .idea | ||
| .vscode | ||
| node_modules | ||
| npm-debug.log | ||
| yarn.lock | ||
| composer.phar | ||
| var/cache | ||
| var/logs | ||
| var/sessions | ||
| .env | ||
| Dockerfile* | ||
| docker-compose*.yml | ||
| **/.DS_Store | ||
| **/Thumbs.db | ||
| vendor/ |
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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Exclude tests and development stuff from archives | ||
| /tests export-ignore | ||
| /.github export-ignore |
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 |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| # Build a production image for phpList base-distribution (Symfony-based) | ||
| FROM php:8.1-apache-bullseye | ||
|
|
||
| # Set workdir | ||
| WORKDIR /var/www/html | ||
|
|
||
| # Install system dependencies and PHP extensions | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| git unzip libzip-dev libicu-dev libpng-dev libonig-dev libxml2-dev \ | ||
| libc-client2007e-dev libkrb5-dev libssl-dev libpq-dev \ | ||
| && docker-php-ext-configure intl \ | ||
| && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ | ||
| && docker-php-ext-install -j"$(nproc)" \ | ||
| pdo pdo_mysql pdo_pgsql zip intl imap \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Enable Apache modules and set DocumentRoot to /public | ||
| RUN a2enmod rewrite headers \ | ||
| && sed -ri 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf \ | ||
| && sed -ri 's!/var/www/!/var/www/html/public!g' /etc/apache2/apache2.conf \ | ||
| && echo "<Directory /var/www/html/public>\n AllowOverride All\n Require all granted\n</Directory>" > /etc/apache2/conf-available/phplist.conf \ | ||
| && a2enconf phplist | ||
|
|
||
| # Copy composer definition first and install dependencies | ||
| COPY composer.json composer.lock ./ | ||
|
|
||
| # Install Composer | ||
| ENV COMPOSER_ALLOW_SUPERUSER=1 \ | ||
| PATH="/usr/local/bin:${PATH}" | ||
| RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | ||
| && php composer-setup.php --install-dir=/usr/local/bin --filename=composer \ | ||
| && rm composer-setup.php | ||
|
|
||
| # Ensure config directory exists for Composer scripts that write into it | ||
| COPY config ./config | ||
|
|
||
| # Install PHP dependencies (include scripts so phpList creates config structure) | ||
| RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader | ||
|
|
||
| # Copy the rest of the application (except files ignored by .dockerignore) | ||
| COPY . . | ||
|
|
||
| # Build Symfony prod cache to match the current vendor code (prevents stale container issues) | ||
| # If env vars are needed for DB during warmup, they can be provided at runtime; warmup should still succeed without DB. | ||
| RUN php bin/console cache:clear --env=prod --no-warmup || true \ | ||
| && php bin/console cache:warmup --env=prod || true | ||
|
|
||
| # Ensure correct permissions for cache/logs | ||
| RUN chown -R www-data:www-data var public \ | ||
| && find var -type d -exec chmod 775 {} \; \ | ||
| && find var -type f -exec chmod 664 {} \; | ||
|
|
||
| # Expose port and run Apache | ||
| EXPOSE 80 | ||
| CMD ["apache2-foreground"] |
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.
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.