Skip to content

Commit

Permalink
Merge pull request #3323 from Minnozz/docker-bind-ro
Browse files Browse the repository at this point in the history
Docker: make bind mounts of source code read only
  • Loading branch information
mouse-reeve committed Mar 23, 2024
2 parents 21f75da + 886d6ec commit b508b4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# BookWyrm
.env
/images/
/static/
bookwyrm/static/css/bookwyrm.css
bookwyrm/static/css/themes/
!bookwyrm/static/css/themes/bookwyrm-*.scss
Expand Down
19 changes: 10 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
networks:
- main
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx:/etc/nginx/conf.d:ro
- static_volume:/app/static
- media_volume:/app/images
db:
Expand All @@ -26,7 +26,7 @@ services:
env_file: .env
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
- .:/app:ro
- static_volume:/app/static
- media_volume:/app/images
depends_on:
Expand All @@ -41,7 +41,7 @@ services:
image: redis:7.2.1
command: redis-server --requirepass ${REDIS_ACTIVITY_PASSWORD} --appendonly yes --port ${REDIS_ACTIVITY_PORT}
volumes:
- ./redis.conf:/etc/redis/redis.conf
- ./redis.conf:/etc/redis/redis.conf:ro
- redis_activity_data:/data
env_file: .env
networks:
Expand All @@ -51,7 +51,7 @@ services:
image: redis:7.2.1
command: redis-server --requirepass ${REDIS_BROKER_PASSWORD} --appendonly yes --port ${REDIS_BROKER_PORT}
volumes:
- ./redis.conf:/etc/redis/redis.conf
- ./redis.conf:/etc/redis/redis.conf:ro
- redis_broker_data:/data
env_file: .env
networks:
Expand All @@ -63,9 +63,8 @@ services:
networks:
- main
command: celery -A celerywyrm worker -l info -Q high_priority,medium_priority,low_priority,streams,images,suggested_users,email,connectors,lists,inbox,imports,import_triggered,broadcast,misc

volumes:
- .:/app
- .:/app:ro
- static_volume:/app/static
- media_volume:/app/images
depends_on:
Expand All @@ -79,7 +78,7 @@ services:
- main
command: celery -A celerywyrm beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- .:/app
- .:/app:ro
- static_volume:/app/static
- media_volume:/app/images
depends_on:
Expand All @@ -90,7 +89,7 @@ services:
command: celery -A celerywyrm flower --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD} --url_prefix=flower
env_file: .env
volumes:
- .:/app
- .:/app:ro
- static_volume:/app/static
networks:
- main
Expand All @@ -103,7 +102,9 @@ services:
env_file: .env
volumes:
- /app/dev-tools/
- .:/app
- .:/app:rw
profiles:
- tools
volumes:
pgdata:
static_volume:
Expand Down
Empty file added images/.gitkeep
Empty file.
Empty file added static/.gitkeep
Empty file.

0 comments on commit b508b4c

Please sign in to comment.