Sharing code between flexible environment modules in a GAE project

前端 未结 3 924
清歌不尽
清歌不尽 2021-01-26 08:41

I\'m structuring my GAE (flex) project as a number of services:

- my-project/
  - services/
    - service_1/
      - service_1.yaml
    - service_2/
      - serv         


        
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-26 09:30

    The method of sharing code across services using symlinks might not be applicable to the flex environment, which is docker-based. This suspicion is based on the last table row from Troubleshooting Custom Runtimes:

    Issue

    • Some files are not included in my application.

    Solutions

    • Docker does not follow symlinks when added by your source tree or your packaging system to the base image, so any source files outside of your applications directory that are referenced by symlinks in your source tree will not be copied into your application.

    Also - dependencies in the flex environment are supposed to be based on a requirements.txt file used to build the dockerfile at deployment time, not on vendoring in libraries by pip installing them into the lib dir which is the standard environment way.

提交回复
热议问题