Initial commit with submodules
This commit is contained in:
commit
bbc9dd85da
5 changed files with 94 additions and 0 deletions
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[submodule "backend"]
|
||||
path = backend
|
||||
url = git@codeberg.org:DishPlannerCommunity/dish-planner-backend.git
|
||||
[submodule "frontend"]
|
||||
path = frontend
|
||||
url = git@codeberg.org:DishPlannerCommunity/dish-planner-frontend.git
|
||||
1
backend
Submodule
1
backend
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a7581a0aee52716e8a8bc7f70663cfd6bc96e4c7
|
||||
66
docker-compose.yml
Normal file
66
docker-compose.yml
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: laravel_backend
|
||||
volumes:
|
||||
- ./backend:/var/www/html
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- APP_ENV=local
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: react_frontend
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
container_name: mysql_db
|
||||
restart: always
|
||||
volumes:
|
||||
- db-data:/var/lib/mysql
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: laravel
|
||||
MYSQL_USER: laravel
|
||||
MYSQL_PASSWORD: laravel
|
||||
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
container_name: nginx_proxy
|
||||
volumes:
|
||||
- ./nginx:/etc/nginx/conf.d
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
- frontend
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
1
frontend
Submodule
1
frontend
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 71ea7c3fe9f304fa60627b4b3c9c3a709cfee3ea
|
||||
20
nginx/default.conf
Normal file
20
nginx/default.conf
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
# Route API requests to Laravel
|
||||
location /api/ {
|
||||
proxy_pass http://backend:80/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
# Route all other requests to React
|
||||
location / {
|
||||
proxy_pass http://frontend:3000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue