-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/docker configs #175
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0161194
Adding the github actions pipelines for this app
danakim 8a784de
Adding the Dockerfiles for this app
danakim 192b22b
We do not need this
danakim abb3782
Docker: Add default config parameters in order to work with the other…
quartje b8b4662
Docker: Add monolog configuration when running as a container
quartje a136680
Docker: Clean and chown the cache dir
quartje c63234a
Docker: Remove APP_ENV from Apache. It is not overrideable when set b…
quartje e07636c
Moving from CMD to ENTRYPOINT
danakim 8e82d6c
Removing the dev image
danakim 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 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,48 @@ | ||
name: build-push-docker-image | ||
|
||
#on: workflow_dispatch | ||
on: | ||
push: | ||
branches: feature/docker_configs | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-push-docker-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get the latest release | ||
id: release | ||
uses: robinraju/[email protected] | ||
with: | ||
latest: true | ||
fileName: "*.tar.bz2" | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push the Production image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.prod | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/openconext/stepup-tiqr/stepup-tiqr:prod | ||
ghcr.io/openconext/stepup-tiqr/stepup-tiqr:${{ github.sha }} | ||
ghcr.io/openconext/stepup-tiqr/stepup-tiqr:${{ steps.release.outputs.tag_name }} |
This file contains 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 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 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,12 @@ | ||
monolog: | ||
handlers: | ||
prod-signaler: | ||
type: fingers_crossed | ||
action_level: ERROR | ||
passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged | ||
handler: main_syslog | ||
bubble: false # if we handle it, nothing else should | ||
main_syslog: | ||
type: stream | ||
path: "php://stderr" | ||
formatter: surfnet_stepup.monolog.json_formatter |
This file contains 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,22 @@ | ||
FROM ghcr.io/openconext/openconext-basecontainers/php72-apache2:latest AS php-build | ||
COPY *.tar.bz2 /tmp/ | ||
RUN tar -xvjf /tmp/*.tar.bz2 -C /var/www/html/ && \ | ||
rm -rf /tmp/*.tar.bz2 | ||
|
||
# Add the application configuration files | ||
COPY config/legacy/parameters.yaml.dist config/legacy/parameters.yaml | ||
COPY config/packages/prod/monolog.yaml.docker config/packages/prod/monolog.yaml | ||
|
||
# TIQR needs some assests to be installed | ||
RUN bin/console assets:install | ||
|
||
# Add the config files for Apache2 | ||
RUN rm -rf /etc/apache2/sites-enabled/* | ||
COPY ./docker/conf/tiqr-apache2.conf /etc/apache2/sites-enabled/tiqr.conf | ||
RUN rm -rf /var/www/html/var/cache/prod && chown -R www-data /var/www/html/var | ||
EXPOSE 80 | ||
|
||
# Set the default workdir | ||
WORKDIR /var/www/html | ||
|
||
ENTRYPOINT ["apache2-foreground"] |
This file contains 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,33 @@ | ||
<Virtualhost *:80> | ||
ServerName tiqr | ||
ServerAdmin [email protected] | ||
|
||
DocumentRoot /var/www/html/public | ||
|
||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | ||
|
||
<Directory "/var/www/html/public"> | ||
Require all granted | ||
|
||
Options -MultiViews | ||
RewriteEngine On | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^(.*)$ index.php [QSA,L] | ||
</Directory> | ||
<Location /> | ||
Require all granted | ||
</Location> | ||
|
||
Header always set X-Content-Type-Options "nosniff" | ||
|
||
# Set the php application handler so mod_php interpets the files | ||
<FilesMatch \.php$> | ||
SetHandler application/x-httpd-php | ||
</FilesMatch> | ||
|
||
ExpiresActive on | ||
ExpiresByType font/* "access plus 1 year" | ||
ExpiresByType image/* "access plus 6 months" | ||
ExpiresByType text/css "access plus 1 year" | ||
ExpiresByType text/js "access plus 1 year" | ||
</VirtualHost> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scratch that?