Skip to content

Commit 5c77bfb

Browse files
committed
fix: docker owner permission
1 parent 7187690 commit 5c77bfb

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ COPY . .
3131
RUN groupadd -g 1000 app && \
3232
useradd -u 1000 -g app -m -s /bin/bash app
3333

34-
# Change ownership of the app directory
35-
RUN chown -R app:app /app
34+
# Change ownership of the app directory and bundle directory
35+
RUN chown -R app:app /app /usr/local/bundle
3636

3737
# Switch to the app user
3838
USER app

docker-compose.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@ services:
3333
api:
3434
build: .
3535
container_name: prostaff-api
36-
environment:
37-
DATABASE_URL: ${DATABASE_URL}
38-
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
39-
RAILS_ENV: ${RAILS_ENV:-development}
40-
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
41-
CORS_ORIGINS: ${CORS_ORIGINS}
42-
RIOT_API_KEY: ${RIOT_API_KEY}
36+
env_file:
37+
- .env
4338
volumes:
4439
- .:/app
4540
- bundle_cache:/usr/local/bundle
@@ -62,11 +57,8 @@ services:
6257
# Sidekiq for background jobs
6358
sidekiq:
6459
build: .
65-
environment:
66-
DATABASE_URL: ${DATABASE_URL}
67-
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
68-
RAILS_ENV: ${RAILS_ENV:-development}
69-
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
60+
env_file:
61+
- .env
7062
volumes:
7163
- .:/app
7264
- bundle_cache:/usr/local/bundle

0 commit comments

Comments
 (0)