Skip to content

symfony 5 lift #1235

@stloc

Description

@stloc

Description:

when deployed assets are not served by cloudfront url

image

How to reproduce:

service: abc

provider:
    name: aws
    region: eu-west-3
    stage: prod
    runtime: provided.al2
    environment:
        # Symfony environment variables
        APP_ENV: prod

plugins:
  - ./vendor/bref/bref
  - serverless-lift

constructs:
  website:
    type: server-side-website
    assets:
      '/assets/*': public/assets

functions:
    web:
        handler: public/index.php
        timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
        layers:
            - ${bref:layer.php-74-fpm}
        events:
            - httpApi: '*'
        environment:
            WEBSITE_URL: ${construct:website.url}

    console:
        handler: bin/console
        timeout: 120 # in seconds
        layers:
            - ${bref:layer.php-74} # PHP
            - ${bref:layer.console} # The "console" layer

package:
    patterns:
        # Excluded files and folders for deployment
        - '!assets/**'
        - '!node_modules/**'
        - '!public/build/**'
        - '!tests/**'
        - '!var/**'
        # If you want to include files and folders that are part of excluded folders,
        # add them at the end
        - 'var/cache/prod/**'
        - 'public/build/entrypoints.json'
        - 'public/build/manifest.json'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions