Skip to content

Commit

Permalink
Nginx static files / Translations (#25)
Browse files Browse the repository at this point in the history
* Fix(nginx): Fixed nginx static files location

* Fix(locale): Added locale volume into yml files, fixed media volume into local yml
  • Loading branch information
inoa-vfabris authored Nov 30, 2023
1 parent 4018105 commit f1810ea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
8 changes: 0 additions & 8 deletions infra/nginx/conf.d/fallback_server.conf

This file was deleted.

3 changes: 3 additions & 0 deletions infra/nginx/vhost.d/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
location /static {
alias /usr/share/nginx/static;
}
1 change: 1 addition & 0 deletions infra/server/start_nginx_acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docker run --detach \
--volume ./infra/nginx/conf.d/custom_proxy.conf:/etc/nginx/conf.d/custom_proxy.conf \
--volume ./infra/nginx/conf.d/fallback_server.conf:/etc/nginx/conf.d/fallback_server.conf \
--volume staticfiles:/usr/share/nginx/static \
--volume ./infra/nginx/vhost.d/default:/etc/nginx/vhost.d/default \
--network shared \
nginxproxy/nginx-proxy

Expand Down
4 changes: 3 additions & 1 deletion local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ services:
volumes:
- ./src:/app/src
- ./storage/static:/app/storage/static
- ./storage/static:/app/storage/media
- ./storage/media:/app/storage/media
- translations:/app/locale
ports:
- ${DJANGO_HTTP_PORT:-8000}:${DJANGO_HTTP_PORT:-8000}
env_file:
Expand Down Expand Up @@ -73,3 +74,4 @@ volumes:
postgres_data:
mediafiles:
cache:
translations:
2 changes: 2 additions & 0 deletions production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
dockerfile: infra/app/Dockerfile
volumes:
- staticfiles:/app/storage/static
- translations:/app/locale
ports:
- 80
env_file:
Expand Down Expand Up @@ -44,6 +45,7 @@ volumes:
staticfiles:
external: true
name: staticfiles
translations:

networks:
shared:
Expand Down
2 changes: 2 additions & 0 deletions staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
dockerfile: infra/app/Dockerfile
volumes:
- staticfiles:/app/storage/static
- translations:/app/locale
ports:
- 80
env_file:
Expand Down Expand Up @@ -44,6 +45,7 @@ volumes:
staticfiles:
external: true
name: staticfiles
translations:

networks:
shared:
Expand Down

0 comments on commit f1810ea

Please sign in to comment.