Skip to content
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

Add recipe for numberninecms/cms 0.5 #1473

Closed

Conversation

williarin
Copy link
Contributor

Q A
License MIT
Packagist https://packagist.org/packages/numberninecms/cms

Recipe for numberninecms/cms 0.5

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 8, 2023 15:24
@github-actions
Copy link

github-actions bot commented Jan 8, 2023

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1473/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1473/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'numberninecms/cms:^0.5'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

numberninecms/cms

0.2 vs 0.5
diff --git a/numberninecms/cms/0.2/config/routes/numbernine.yaml b/numberninecms/cms/0.5/config/routes/numbernine.yaml
index bd949b07..4ebaccd9 100644
--- a/numberninecms/cms/0.2/config/routes/numbernine.yaml
+++ b/numberninecms/cms/0.5/config/routes/numbernine.yaml
@@ -1,2 +1,2 @@
 numbernine:
-    resource: '@NumberNineBundle/Resources/config/routing.yaml'
+    resource: '@NumberNineBundle/config/routing.yaml'
diff --git a/numberninecms/cms/0.2/manifest.json b/numberninecms/cms/0.5/manifest.json
index 1d16865b..34f69d33 100644
--- a/numberninecms/cms/0.2/manifest.json
+++ b/numberninecms/cms/0.5/manifest.json
@@ -1,17 +1,138 @@
 {
     "bundles": {
-        "NumberNine\\Bundle\\NumberNineBundle": ["all"]
+        "NumberNine\\NumberNineBundle": ["all"]
     },
     "copy-from-recipe": {
         "config/": "%CONFIG_DIR%/"
     },
     "copy-from-package": {
-        "install/docker-compose.yml": "docker-compose.yml",
         "install/docker/": "docker/",
-        "install/public/": "%PUBLIC_DIR%/"
+        "install/public/": "%PUBLIC_DIR%/",
+        "install/Makefile": "Makefile"
+    },
+    "docker-compose": {
+        "docker-compose.yml": {
+            "services": [
+                "php:",
+                "  build:",
+                "    context: .",
+                "    dockerfile: docker/dk.php.Dockerfile",
+                "    args:",
+                "      PHP_VERSION: 8.1-fpm-dev",
+                "  user: '1000:1000'",
+                "  restart: 'no'",
+                "  volumes:",
+                "    - ./:/var/www/html",
+                "    - ./docker/php/xdebug.ini:/etc/php81/conf.d/50_xdebug.ini:ro",
+                "    - ./docker/php/symfony.ini:/etc/php81/conf.d/99_symfony.ini:ro",
+                "  extra_hosts:",
+                "    - host.docker.internal:host-gateway",
+                "",
+                "nginx:",
+                "  build:",
+                "    context: .",
+                "    dockerfile: docker/dk.nginx.Dockerfile",
+                "  restart: 'no'",
+                "  volumes:",
+                "    - ./public/:/var/www/html/public:ro",
+                "  depends_on:",
+                "    - php",
+                "    - traefik",
+                "  networks:",
+                "    - default",
+                "    - traefik",
+                "  labels:",
+                "    - app.proxy.name=${APP_NAME:-numbernine}",
+                "    - traefik.enable=true",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}.rule=Host(`${APP_NAME:-numbernine}.localhost`)",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}.tls=true",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}.entrypoints=websecure",
+                "    - traefik.http.services.${APP_NAME:-numbernine}.loadbalancer.server.port=80",
+                "",
+                "database:",
+                "  image: mysql",
+                "  restart: 'no'",
+                "  environment:",
+                "    - MYSQL_USER=user",
+                "    - MYSQL_PASSWORD=user",
+                "    - MYSQL_ROOT_PASSWORD=root",
+                "    - MYSQL_DATABASE=numbernine_app",
+                "  volumes:",
+                "    - db-data:/var/lib/mysql",
+                "  networks:",
+                "    default:",
+                "      aliases:",
+                "        - mysql",
+                "",
+                "redis:",
+                "  image: redis:alpine",
+                "  restart: 'no'",
+                "",
+                "mailer:",
+                "  image: maildev/maildev",
+                "  restart: 'no'",
+                "  networks:",
+                "    - default",
+                "    - traefik",
+                "  depends_on:",
+                "    - traefik",
+                "  labels:",
+                "    - app.proxy.name=${APP_NAME:-numbernine}",
+                "    - traefik.enable=true",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-mail.rule=Host(`${APP_NAME:-numbernine}-mail.localhost`)",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-mail.tls=true",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-mail.entrypoints=websecure",
+                "    - traefik.http.services.${APP_NAME:-numbernine}-mail.loadbalancer.server.port=1080",
+                "    - traefik.tcp.routers.${APP_NAME:-numbernine}-smtp.rule=HostSNI(`${APP_NAME:-numbernine}-smtp.localhost`)",
+                "    - traefik.tcp.routers.${APP_NAME:-numbernine}-smtp.entrypoints=smtpsecure",
+                "    - traefik.tcp.routers.${APP_NAME:-numbernine}-smtp.tls=true",
+                "    - traefik.tcp.routers.${APP_NAME:-numbernine}-smtp.service=${APP_NAME:-numbernine}-smtp",
+                "    - traefik.tcp.services.${APP_NAME:-numbernine}-smtp.loadbalancer.server.port=1025",
+                "",
+                "traefik:",
+                "  image: traefik",
+                "  restart: 'no'",
+                "  ports:",
+                "    - '443:443'",
+                "  volumes:",
+                "    - /var/run/docker.sock:/var/run/docker.sock:ro",
+                "  networks:",
+                "    - traefik",
+                "  command:",
+                "    - --providers.docker",
+                "    - --providers.docker.exposedbydefault=false",
+                "    - --providers.docker.network=${PROJECT_DIR:-numbernine}_traefik",
+                "    - --providers.docker.constraints=Label(`app.proxy.name`, `${APP_NAME:-numbernine}`)",
+                "    - --entrypoints.web.address=:80",
+                "    - --entrypoints.web.http.redirections.entryPoint.to=websecure",
+                "    - --entrypoints.web.http.redirections.entryPoint.scheme=https",
+                "    - --entrypoints.websecure.address=:443",
+                "    - --entrypoints.smtp.address=:25",
+                "    - --entrypoints.smtpsecure.address=:465",
+                "    - --accesslog",
+                "    - --log",
+                "    - --api",
+                "  labels:",
+                "    - app.proxy.name=${APP_NAME:-numbernine}",
+                "    - traefik.enable=true",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-traefik.rule=Host(`${APP_NAME:-numbernine}-traefik.localhost`)",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-traefik.entrypoints=websecure",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-traefik.tls=true",
+                "    - traefik.http.routers.${APP_NAME:-numbernine}-traefik.service=api@internal",
+                "    - traefik.http.services.${APP_NAME:-numbernine}-traefik.loadbalancer.server.port=8080"
+            ],
+            "volumes": ["db-data:"],
+            "networks": ["traefik:"]
+        },
+        "docker-compose.override.yml": {
+            "services": [
+                    "database:",
+                    "  ports:",
+                    "    - \"3306\""
+            ]
+        }
     },
     "gitignore": [
-        "/public/admin",
-        "/public/uploads"
+        "/public/uploads/"
     ]
 }
diff --git a/numberninecms/cms/0.2/post-install.txt b/numberninecms/cms/0.5/post-install.txt
index f60390e4..412b11f4 100644
--- a/numberninecms/cms/0.2/post-install.txt
+++ b/numberninecms/cms/0.5/post-install.txt
@@ -1,3 +1 @@
-  * Run php bin/console numbernine:docker:install
-
-  * Read the documentation at https://numberninecms.github.io/
+  * Read the documentation at https://numberninecms.com/

@weaverryan
Copy link
Member

Hi! Check the CI - it fails with: Uncaught Error: Class "NumberNine\NumberNineBundle" not found

Cheers!

@williarin
Copy link
Contributor Author

Hi! Yes I fixed it, can the job be re-run?

auto-merge was automatically disabled January 10, 2023 15:20

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 10, 2023 15:22
auto-merge was automatically disabled January 10, 2023 15:23

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 10, 2023 15:24
auto-merge was automatically disabled January 10, 2023 15:26

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 10, 2023 15:26
@chalasr
Copy link
Member

chalasr commented Apr 28, 2024

looks like the current build didn't run, please force-push again to trigger a new one

@williarin
Copy link
Contributor Author

Hello, thank you for noticing this problem! I forgot about it. Before I do that, is there a way to completely remove this recipe?
I'd like to use https://github.com/williarin/cook instead of Flex for recipe management but I'm not sure how to proceed for unregistering it from here.

@chalasr
Copy link
Member

chalasr commented Apr 28, 2024

You're welcome.
To remove a recipe, you have to submit a pull request removing the directory corresponding to the bundle for which the recipe is for. If the vendor only has 1 recipe (the removed one), then remove the directory corresponding to the vendor name as well (numberninecms here).

On a side note, Symfony Flex is widely deployed in the Symfony ecosystem so if adoption is something important for your package, keeping it on flex may be interesting.

@fabpot
Copy link
Member

fabpot commented Jun 7, 2024

Closing as there is no more activity.

@fabpot fabpot closed this Jun 7, 2024
auto-merge was automatically disabled June 7, 2024 09:04

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants