-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37633d2
commit d4972e6
Showing
7 changed files
with
136 additions
and
19 deletions.
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,44 @@ | ||
name: Docker Image Laravel | ||
env: | ||
# 🖊️ EDIT to change the image registry settings. | ||
# Registries such as GHCR, Quay.io, and Docker Hub are supported. | ||
IMAGE_REGISTRY: ghcr.io/utrechtuniversity | ||
IMAGE_REGISTRY_USER: ${{ github.actor }} | ||
IMAGE_REGISTRY_PASSWORD: ${{ github.token }} | ||
|
||
|
||
on: | ||
push: | ||
branches: [ "master" "develop" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: Laravel | ||
tags: ${{ env.IMAGE_TAGS }} | ||
|
||
# If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs | ||
# Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build | ||
# Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. | ||
dockerfiles: | | ||
./openshift/openshift.dockerfile | ||
- name: Push to registry | ||
id: push-image | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
username: ${{ env.IMAGE_REGISTRY_USER }} | ||
password: ${{ env.IMAGE_REGISTRY_PASSWORD }} |
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,44 @@ | ||
name: Docker Image Laravel | ||
env: | ||
# 🖊️ EDIT to change the image registry settings. | ||
# Registries such as GHCR, Quay.io, and Docker Hub are supported. | ||
IMAGE_REGISTRY: ghcr.io/utrechtuniversity | ||
IMAGE_REGISTRY_USER: ${{ github.actor }} | ||
IMAGE_REGISTRY_PASSWORD: ${{ github.token }} | ||
|
||
|
||
on: | ||
push: | ||
branches: [ "master" "develop" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: Nginx | ||
tags: ${{ env.IMAGE_TAGS }} | ||
|
||
# If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs | ||
# Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build | ||
# Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. | ||
dockerfiles: | | ||
./openshift/nginx.dockerfile | ||
- name: Push to registry | ||
id: push-image | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
username: ${{ env.IMAGE_REGISTRY_USER }} | ||
password: ${{ env.IMAGE_REGISTRY_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
FROM nginxinc/nginx-unprivileged:stable-alpine | ||
|
||
ADD ./openshift/vhost.conf /etc/nginx/conf.d/default.conf | ||
|
||
|
||
# Expose port 8443 and start php-fpm server | ||
EXPOSE 8080 | ||
CMD ["nginx", "-g", "daemon off;"] |
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,19 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: ghcr.io/utrechtuniversity/openshift-nginx:latest | ||
ports: | ||
- containerPort: 8080 |
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,20 @@ | ||
server { | ||
listen 80; | ||
server_name app.openshift.fss.uu.nl; | ||
index index.php index.html; | ||
root /var/www/public; | ||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
location / { | ||
try_files $uri /index.php?$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass backend:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
} |