Fix Docker chown logic

This commit is contained in:
Andrew 2024-02-02 14:59:57 +03:00
parent ab35775e94
commit 1521b66f12
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}/package.json
- ./data/src:${APP_DIRECTORY:-/opt/strapi}/src
- ./data/config:${APP_DIRECTORY:-/opt/strapi}/config
- ./data/public:${APP_DIRECTORY:-/opt/strapi}/public
- ./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
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}
RUN chown -R node:node ${APP_DIRECTORY}/node_modules
# Run as node
USER node