-
Notifications
You must be signed in to change notification settings - Fork 10
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
[BUILD] fix docker configuration for the Quickstart application #90
Merged
anthony-murphy-lrn
merged 13 commits into
master
from
LRN-45518/bug/php-sdk-docker-setup-quickstart-api-access
Feb 28, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f52a4d2
[BUILD] add Docker files for PHP SDK setup in Quickstart application …
anthony-murphy-lrn 1bdd988
[BUILD] add docker-compose.yml to build NGINX and PHP containers LRN-…
anthony-murphy-lrn e1e1ad6
[BUILD] update quickstart target to run either docker container or lo…
anthony-murphy-lrn be2b85f
[DOC] update docs to detail how to run with docker or with a local ph…
anthony-murphy-lrn e0309ba
[BUILD] give the containers more useful name LRN-45518
anthony-murphy-lrn 05ea107
[DOC] update changelog to include this fix as unreleased
anthony-murphy-lrn b33b0bd
[DOC] fix Markup formatting
anthony-murphy-lrn 21ce36f
[DOC] add language to code blocks LRN-45518
anthony-murphy-lrn 22c2778
[BUILD] ensure correct PHP Docker file is committed LRN-45518
anthony-murphy-lrn e7598bf
[BUILD] remove old Dockerfile in favour of specific PHP & nginx Docke…
anthony-murphy-lrn 6bb6c24
[REFACTOR] Remove unused exports
anthony-murphy-lrn 7079326
[BUILD] Update quickstart logic based on Davids comments
anthony-murphy-lrn 1231a3e
[BUILD] Remove duplicated unused target
anthony-murphy-lrn 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
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
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,43 @@ | ||
version: '3.8' | ||
|
||
networks: | ||
quickstart-network: | ||
driver: bridge | ||
|
||
services: | ||
nginx: | ||
container_name: learnosity-php-sdk-nginx | ||
build: | ||
context: . | ||
dockerfile: docker/nginx/Dockerfile | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- .:/var/www/html | ||
environment: | ||
APPLICATION_SERVER_LANGUAGE: php | ||
UPSTREAM_APPLICATION_SERVICE: php:9000 | ||
depends_on: | ||
- php | ||
networks: | ||
quickstart-network: | ||
aliases: | ||
- nginx | ||
|
||
php: | ||
container_name: learnosity-php-sdk-php-frm | ||
build: | ||
context: . | ||
dockerfile: docker/php/Dockerfile | ||
args: | ||
PHP_VERSION: ${PHP_VERSION:-8.3} | ||
DEBIAN_VERSION: ${DEBIAN_VERSION:-bookworm} | ||
COMPOSER_VERSION: ${COMPOSER_VERSION:-2.7.6} | ||
volumes: | ||
- .:/var/www/html | ||
environment: | ||
- SERVER_NAME=localhost | ||
networks: | ||
quickstart-network: | ||
aliases: | ||
- php |
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,11 @@ | ||
FROM nginx:stable-alpine | ||
|
||
# Copy custom nginx configuration | ||
COPY ./docker/nginx/default.conf /etc/nginx/conf.d/default.conf | ||
|
||
WORKDIR /var/www/html | ||
|
||
# Optional: Add any additional Nginx-specific configurations or setup | ||
EXPOSE 8000 | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
server { | ||
listen 8000; | ||
server_name localhost; | ||
root /var/www/html/docs/quickstart; | ||
index index.php index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_pass php:9000; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
} |
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,24 @@ | ||
ARG PHP_VERSION=8.3 | ||
ARG DEBIAN_VERSION=bookworm | ||
ARG COMPOSER_VERSION=2.7.6 | ||
|
||
FROM php:${PHP_VERSION}-fpm-${DEBIAN_VERSION} | ||
|
||
# Install necessary dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
git=1:2.* \ | ||
libzip-dev=1.* \ | ||
unzip=6.0* \ | ||
zip=3.0* \ | ||
&& docker-php-ext-install zip \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Configure PHP-FPM to listen on TCP/IP | ||
RUN sed -i 's/listen = \/run\/php-fpm.sock/listen = 127.0.0.1:9000/g' /usr/local/etc/php-fpm.d/www.conf | ||
|
||
WORKDIR /var/www/html | ||
|
||
EXPOSE 9000 | ||
|
||
CMD ["php-fpm"] |
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.
This is obsolete.