Skip to content

Add docker support#1

Open
dolczykk wants to merge 2 commits into
mainfrom
devops/deploy
Open

Add docker support#1
dolczykk wants to merge 2 commits into
mainfrom
devops/deploy

Conversation

@dolczykk

Copy link
Copy Markdown
Member

No description provided.

@dolczykk dolczykk self-assigned this Nov 20, 2025
@dolczykk dolczykk added the enhancement New feature or request label Nov 20, 2025
@dolczykk dolczykk requested a review from Norbi0801 November 20, 2025 19:44
Comment thread .dockerignore
@@ -0,0 +1 @@
public/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zastanawiam się czy nie powinniśmy tutaj dodać jeszcze ignore jakieś inne foldery

  • Sprawdzić czy ta lista jest wystarczająca i jeśli tak to dlaczego

Comment thread docker-compose.prod.yml
@@ -0,0 +1,14 @@
version: "3.9"
name: rustlab-page

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nie znalazłem w specyfikacji docker compose pola name. Czy to doszło w jakiejś nowszej wersji? https://github.com/compose-spec/compose-spec

  • Weryfikacja pochodzenia pola name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread nginx/nginx.conf
@@ -0,0 +1,22 @@
server {
listen 80;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tutaj powiniśmy nasłuchiwać z zewnątrz na port 443 a port 80 redirectować na ten 443
server { listen 80; server_name _; return 301 https://$host$request_uri; }

Comment thread nginx/nginx.conf

root /usr/share/nginx/html;

location / {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dodałbym mechanizm cache control jeszcze

location ~* \.(css|js|svg|woff2|png|jpg|jpeg|gif)$ {
    add_header Cache-Control "public, max-age=31536000, immutable";
}

Comment thread nginx/nginx.conf
server_name _;

access_log /var/log/nginx/host.access.log main;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na wszelki wypadek dodałbym blokowanie dostępu do .git i innych tegi typu plików

location ~ /\.(?!well-known).* {
    deny all;
}

Comment thread nginx/nginx.conf
gzip on;
gzip_comp_level 6;
gzip_types
text/html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Czy nie powinniśmy tutaj dodać pewnych security headers? https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html

Comment thread Dockerfile

FROM nginx:1.29.3-alpine

COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zastanowiłbym się czy chcemy mieć jakąś opcję przechowywania logów nginx na wszelki wypadek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants