add two more
This commit is contained in:
parent
8d00358b3d
commit
dc77de7ccd
|
|
@ -3,7 +3,7 @@ services:
|
||||||
# MariaDB Database
|
# MariaDB Database
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:10.6
|
image: mariadb:10.11
|
||||||
container_name: sec_lab_db
|
container_name: sec_lab_db
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: root_password
|
MYSQL_ROOT_PASSWORD: root_password
|
||||||
|
|
@ -23,8 +23,8 @@ services:
|
||||||
image: nginx:stable-alpine
|
image: nginx:stable-alpine
|
||||||
container_name: sec_lab_victim_nginx
|
container_name: sec_lab_victim_nginx
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8721:80"
|
||||||
- "443:443"
|
- "8722:443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html:ro
|
- ./:/var/www/html:ro
|
||||||
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
|
|
@ -45,16 +45,18 @@ services:
|
||||||
dockerfile: ./docker/php/Dockerfile
|
dockerfile: ./docker/php/Dockerfile
|
||||||
args:
|
args:
|
||||||
# اینجا میتوانید آدرس Nexus داخلی سرور خود را بدهید
|
# اینجا میتوانید آدرس Nexus داخلی سرور خود را بدهید
|
||||||
- COMPOSER_REGISTRY=http://192.168.1.201:8081/repository/composer-runflare/
|
- COMPOSER_REGISTRY=https://mirror-composer.runflare.com
|
||||||
- LINUX_REGISTRY=http://192.168.1.201:8081/repository/debian-arvan
|
- LINUX_REGISTRY=http://mirror.arvancloud.ir/debian
|
||||||
- SECURITY_REGISTRY=http://192.168.1.201:8081/repository/debian-arvan-security
|
- SECURITY_REGISTRY=http://mirror.arvancloud.ir/debian-security
|
||||||
- NPM_REGISTRY=http://192.168.1.201:8081/repository/npm-group/
|
- NPM_REGISTRY=https://package-mirror.liara.ir/repository/npm/
|
||||||
- NODE_REGISTRY=http://192.168.1.201:8081/repository/node-dist
|
network: host
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html:rw
|
- ./:/var/www/html:rw
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- lab_net
|
- lab_net
|
||||||
restart: always
|
restart: always
|
||||||
|
|
@ -66,7 +68,7 @@ services:
|
||||||
image: nginx:stable-alpine
|
image: nginx:stable-alpine
|
||||||
container_name: sec_lab_attacker_nginx
|
container_name: sec_lab_attacker_nginx
|
||||||
ports:
|
ports:
|
||||||
- "58691:80"
|
- "8723:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html:ro # حالا هکر هم به کدهای لاراول دسترسی دارد
|
- ./:/var/www/html:ro # حالا هکر هم به کدهای لاراول دسترسی دارد
|
||||||
- ./docker/nginx/hacker.conf:/etc/nginx/conf.d/default.conf:ro # کانفیگ اختصاصی هکر
|
- ./docker/nginx/hacker.conf:/etc/nginx/conf.d/default.conf:ro # کانفیگ اختصاصی هکر
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name webapp.kr-rezvan.ir blog.webapp.kr-rezvan.ir;
|
server_name webapp.kr-rezvan.ir blog.webapp.kr-rezvan.ir;
|
||||||
return 301 https://$host$request_uri; # ریدایرکت به نسخه امن
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
server_name webapp.kr-rezvan.ir blog.webapp.kr-rezvan.ir;
|
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/certs/kr-rezvan.ir.pem;
|
|
||||||
ssl_certificate_key /etc/nginx/certs/kr-rezvan.ir-key.pem;
|
|
||||||
|
|
||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
@ -22,5 +13,9 @@ server {
|
||||||
fastcgi_pass php:9000;
|
fastcgi_pass php:9000;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|
||||||
|
# هدرهای پروکسی را به PHP-FPM پاس بده تا لاراول متوجه HTTPS بودن بشود
|
||||||
|
fastcgi_param HTTP_X_FORWARDED_PROTO https;
|
||||||
|
fastcgi_param HTTP_X_FORWARDED_PORT 443;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name hackerapp.eitebar.ir;
|
server_name hackerapp.eitebar.ir;
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
server_name hackerapp.eitebar.ir;
|
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/certs/kr-rezvan.ir.pem;
|
|
||||||
ssl_certificate_key /etc/nginx/certs/kr-rezvan.ir-key.pem;
|
|
||||||
|
|
||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
@ -22,5 +13,8 @@ server {
|
||||||
fastcgi_pass php:9000;
|
fastcgi_pass php:9000;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|
||||||
|
fastcgi_param HTTP_X_FORWARDED_PROTO https;
|
||||||
|
fastcgi_param HTTP_X_FORWARDED_PORT 443;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,13 +2,13 @@ FROM php:8.2-fpm-bookworm
|
||||||
|
|
||||||
# متغیرهای ریجستری (اضافه شدن NPM)
|
# متغیرهای ریجستری (اضافه شدن NPM)
|
||||||
ARG COMPOSER_REGISTRY="https://mirror-composer.runflare.com"
|
ARG COMPOSER_REGISTRY="https://mirror-composer.runflare.com"
|
||||||
ARG LINUX_REGISTRY="http://deb.debian.org/debian"
|
ARG LINUX_REGISTRY="http://mirror.arvancloud.ir/debian"
|
||||||
ARG SECURITY_REGISTRY="http://security.debian.org/debian-security"
|
ARG SECURITY_REGISTRY="http://mirror.arvancloud.ir/debian-security"
|
||||||
# تغییر سورسهای apt
|
# تغییر سورسهای apt
|
||||||
RUN sed -i "s|http://deb.debian.org/debian|${LINUX_REGISTRY}|g" /etc/apt/sources.list.d/debian.sources \
|
#RUN sed -i "s|http://deb.debian.org/debian|${LINUX_REGISTRY}|g" /etc/apt/sources.list.d/debian.sources \
|
||||||
&& sed -i "s|http://security.debian.org/debian-security|${SECURITY_REGISTRY}|g" /etc/apt/sources.list.d/debian.sources \
|
# && sed -i "s|http://security.debian.org/debian-security|${SECURITY_REGISTRY}|g" /etc/apt/sources.list.d/debian.sources \
|
||||||
&& echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore \
|
# && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore \
|
||||||
&& echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99ignore
|
# && echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99ignore
|
||||||
|
|
||||||
# نصب nodejs و npm در کنار سایر وابستگیها
|
# نصب nodejs و npm در کنار سایر وابستگیها
|
||||||
RUN apt-get update && apt-get install -y --allow-downgrades --no-install-recommends \
|
RUN apt-get update && apt-get install -y --allow-downgrades --no-install-recommends \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user