Skip to content

Commit

Permalink
added mercure and fixed nginx and app environmentals
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Ruf committed Oct 17, 2023
1 parent d0f715d commit 9b8f7f4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 9 deletions.
11 changes: 8 additions & 3 deletions site.conf → default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ server {
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html;
root /var/www/meals/public;

location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
48 changes: 42 additions & 6 deletions docker-compose-cypress.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
services:
app:
image: "${IMAGE_APP:-aoepeople/meals:edge}"
image: aoepeople/meals:beta
environment:
- APP_DEBUG=1
- APP_ENV=test
- APP_ENV=staging
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=db_test
Expand All @@ -13,10 +13,20 @@ services:
- SMTP_HOST=mail
- SMTP_PORT=1025
- SMTP_AUTH=off
- IDP_SERVER=https://aoe.login.bare.id/auth/realms/aoe-staging
- IDP_CLIENT_ID=aoe-meals-staging
- IDP_CLIENT_SECRET=1f775b38-d48c-45e5-9e7a-bcb0ca76488e
- APP_NAME=Meals
- APP_BASE_URL=http://localhost
- DB_URL=mysql://db:db@db:3306/db_test?serverVersion=5.7&charset=utf8
- MERCURE_URL=https://mercure/.well-known/mercure
- MERCURE_PUBLIC_URL=http://localhost:2443/.well-known/mercure
- MERCURE_JWT_SECRET="ChangeMeChangeMeChangeMeChangeMe"
- USE_FORWARDED_HEADERS=1
depends_on:
- db
volumes:
- ./src:/var/www/html/
- shared:/var/www/meals/public/

db:
image: "mysql:5.7"
Expand All @@ -32,7 +42,33 @@ services:
nginx:
image: nginx:latest
ports:
- "8033:80"
- "80:80"
volumes:
- ./src:/var/www/html/
- ./site.conf:/etc/nginx/conf.d/default.conf
- shared:/var/www/meals/public
- ./default.conf:/etc/nginx/conf.d/default.conf

mercure:
image: dunglas/mercure:v0.14
restart: unless-stopped
environment:
MERCURE_ALLOWED_ORIGINS: http://localhost
MERCURE_ALLOWED_PUBLISH_ORIGINS: web
MERCURE_PUBLISHER_JWT_ALG: HS256
MERCURE_PUBLISHER_JWT_KEY: testing-testing-testing-testing!
MERCURE_SUBSCRIBER_JWT_ALG: HS256
MERCURE_SUBSCRIBER_JWT_KEY: testing-testing-testing-testing!
HTTP_EXPOSE: '8080:8080'
HTTPS_EXPOSE: '8081:8080'
SERVER_ADDRESS: 'http://localhost:8080, http://localhost:8080'
expose:
- 8080
volumes:
- caddy_data:/data
- caddy_config:/config
- ./.ddev/caddy/Caddyfile.dev:/etc/caddy/Caddyfile

volumes:
shared:
driver: local
caddy_data:
caddy_config:

0 comments on commit 9b8f7f4

Please sign in to comment.