Skip to content

Commit 5700a97

Browse files
committed
obrisani nepotrebni fajlovi
1 parent da20fc2 commit 5700a97

File tree

175 files changed

+120
-356223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+120
-356223
lines changed

docker-compose.prod.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
services:
2+
mysql:
3+
image: mysql:8.0
4+
container_name: crmnekretnine-mysql
5+
environment:
6+
MYSQL_DATABASE: crmnekretnine
7+
MYSQL_USER: crm
8+
MYSQL_PASSWORD: crm
9+
MYSQL_ROOT_PASSWORD: root
10+
ports:
11+
- "3308:3306"
12+
volumes:
13+
- mysql_data:/var/lib/mysql
14+
command: --default-authentication-plugin=mysql_native_password
15+
16+
laravel:
17+
build:
18+
context: ./laravel
19+
dockerfile: Dockerfile
20+
container_name: crmnekretnine-laravel
21+
working_dir: /var/www
22+
environment:
23+
APP_ENV: production
24+
APP_DEBUG: "false"
25+
26+
DB_CONNECTION: mysql
27+
DB_HOST: mysql
28+
DB_PORT: 3306
29+
DB_DATABASE: crmnekretnine
30+
DB_USERNAME: crm
31+
DB_PASSWORD: crm
32+
33+
RUN_MIGRATIONS: "true"
34+
RUN_SEED: "false"
35+
depends_on:
36+
- mysql
37+
38+
nginx:
39+
image: nginx:1.27-alpine
40+
container_name: crmnekretnine-nginx
41+
ports:
42+
- "8088:80"
43+
volumes:
44+
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
45+
depends_on:
46+
- laravel
47+
48+
reactfront:
49+
build:
50+
context: ./reactfront
51+
dockerfile: Dockerfile
52+
container_name: crmnekretnine-reactfront
53+
ports:
54+
- "3008:3000"
55+
depends_on:
56+
- nginx
57+
58+
phpmyadmin:
59+
image: phpmyadmin:5
60+
container_name: crmnekretnine-phpmyadmin
61+
environment:
62+
PMA_HOST: mysql
63+
PMA_PORT: 3306
64+
MYSQL_ROOT_PASSWORD: root
65+
ports:
66+
- "8089:80"
67+
depends_on:
68+
- mysql
69+
70+
volumes:
71+
mysql_data:

docker-compose.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,23 @@ services:
2222
environment:
2323
APP_ENV: local
2424
APP_DEBUG: "true"
25+
2526
DB_CONNECTION: mysql
2627
DB_HOST: mysql
2728
DB_PORT: 3306
2829
DB_DATABASE: crmnekretnine
2930
DB_USERNAME: crm
3031
DB_PASSWORD: crm
32+
RUN_MIGRATIONS: "true"
33+
RUN_SEED: "true"
34+
35+
# FIX za "View path not found" / cache path
36+
VIEW_COMPILED_PATH: /var/www/storage/framework/views
3137
volumes:
3238
- ./laravel:/var/www
39+
- laravel_vendor:/var/www/vendor
40+
- laravel_storage:/var/www/storage
41+
- laravel_cache:/var/www/bootstrap/cache
3342
depends_on:
3443
- mysql
3544

@@ -75,4 +84,7 @@ services:
7584

7685
volumes:
7786
mysql_data:
78-
react_node_modules:
87+
react_node_modules:
88+
laravel_storage:
89+
laravel_cache:
90+
laravel_vendor:

docker/nginx/default.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ server {
1313

1414
location ~ \.php$ {
1515
try_files $uri =404;
16+
1617
fastcgi_pass laravel:9000;
1718
fastcgi_index index.php;
19+
1820
include fastcgi_params;
19-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
21+
22+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
23+
fastcgi_param DOCUMENT_ROOT $realpath_root;
2024
fastcgi_param PATH_INFO $fastcgi_path_info;
2125
}
2226
}

laravel/docker/entrypoint.sh

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
#!/bin/sh
22
set -e
33

4-
5-
mkdir -p /var/www/storage /var/www/bootstrap/cache
6-
chmod -R 775 /var/www/storage /var/www/bootstrap/cache || true
4+
mkdir -p /var/www/storage/framework/cache \
5+
/var/www/storage/framework/sessions \
6+
/var/www/storage/framework/views \
7+
/var/www/storage/logs \
8+
/var/www/bootstrap/cache
9+
10+
chmod -R 777 /var/www/storage /var/www/bootstrap/cache || true
11+
12+
# Ako vendor ne postoji (tipično zbog bind mount-a), instaliraj dependencije
13+
if [ ! -d "/var/www/vendor" ]; then
14+
echo "vendor/ not found -> running composer install..."
15+
composer install --no-interaction --prefer-dist
16+
fi
17+
18+
# Sacekaj MySQL (da migracije ne puknu)
19+
if [ -n "$DB_HOST" ]; then
20+
echo "Waiting for MySQL at $DB_HOST:$DB_PORT..."
21+
until php -r "try { new PDO('mysql:host=' . getenv('DB_HOST') . ';port=' . getenv('DB_PORT'), getenv('DB_USERNAME'), getenv('DB_PASSWORD')); echo 'OK'; } catch (Exception \$e) { exit(1);}"; do
22+
sleep 2
23+
done
24+
echo "MySQL is up."
25+
fi
26+
27+
# Opciona migracija/seed preko env varijabli
28+
if [ "$RUN_MIGRATIONS" = "true" ]; then
29+
php artisan migrate --no-interaction
30+
fi
31+
32+
if [ "$RUN_SEED" = "true" ]; then
33+
php artisan db:seed --no-interaction
34+
fi
735

836
exec "$@"

node_modules/.package-lock.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

node_modules/react-icons/LICENSE

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)