Fix Docker chown logic (vol. 2)

This commit is contained in:
Andrew 2024-02-02 15:20:54 +03:00
parent 1521b66f12
commit 8ddc517e49
2 changed files with 5 additions and 5 deletions

View File

@ -34,10 +34,10 @@ services:
networks:
- cms
volumes:
- ./data/package.json:${APP_DIRECTORY:-/opt/strapi}/app/package.json
- ./data/src:${APP_DIRECTORY:-/opt/strapi}/app/src
- ./data/config:${APP_DIRECTORY:-/opt/strapi}/app/config
- ./data/public:${APP_DIRECTORY:-/opt/strapi}/app/public
- ./strapi/package.json:${APP_DIRECTORY:-/opt/strapi}/app/package.json
- ./strapi/src:${APP_DIRECTORY:-/opt/strapi}/app/src
- ./strapi/config:${APP_DIRECTORY:-/opt/strapi}/app/config
- ./strapi/public:${APP_DIRECTORY:-/opt/strapi}/app/public
ports:
- '127.0.0.1:3684:8000'
env_file:

View File

@ -53,7 +53,7 @@ COPY --from=build ${APP_DIRECTORY}/app .
ENV PATH ${APP_DIRECTORY}/node_modules/.bin:$PATH
# Set user and group rights
RUN chown -R node:node ${APP_DIRECTORY}/node_modules
RUN chown -R node:node ${APP_DIRECTORY}/app
# Run as node
USER node