mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-06-15 13:32:43 +01:00
add reverse proxy setup and setup instructions
This commit is contained in:
12
.env.example
12
.env.example
@@ -8,12 +8,12 @@ LOG_CHANNEL=stack
|
|||||||
LOG_DEPRECATIONS_CHANNEL=null
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=pgsql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=pgsql
|
||||||
DB_PORT=3306
|
DB_PORT=5432
|
||||||
DB_DATABASE=laravel
|
DB_DATABASE=laravel
|
||||||
DB_USERNAME=root
|
DB_USERNAME=root
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=root
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
@@ -57,3 +57,7 @@ VITE_PUSHER_HOST="${PUSHER_HOST}"
|
|||||||
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
NGINX_HOST_NAME=timetracker.test
|
||||||
|
NETWORK_NAME=reverse-proxy-docker-traefik_routing
|
||||||
|
|
||||||
|
|||||||
43
README.md
43
README.md
@@ -1,2 +1,45 @@
|
|||||||
# Time-tracking project
|
# Time-tracking project
|
||||||
|
|
||||||
|
## Setup the Project
|
||||||
|
|
||||||
|
System Requirements:
|
||||||
|
* Docker
|
||||||
|
* PHP 8.2
|
||||||
|
* Composer
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer install
|
||||||
|
|
||||||
|
cp .env.example .env
|
||||||
|
|
||||||
|
./vendor/bin/sail up -d
|
||||||
|
|
||||||
|
./vendor/bin/sail artisan key:generate
|
||||||
|
|
||||||
|
./vendor/bin/sail artisan migrate:fresh --seed
|
||||||
|
|
||||||
|
./vendor/bin/sail npm install
|
||||||
|
|
||||||
|
./vendor/bin/sail npm run build
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to set the APP_PORT and VITE_PORT inside your `.env` file to a port that is not already used by your system.
|
||||||
|
|
||||||
|
## Setup with Reverse Proxy
|
||||||
|
|
||||||
|
Additional System Requirements:
|
||||||
|
* Traefik 2 Reverse-Proxy (https://github.com/korridor/reverse-proxy-docker-traefik)
|
||||||
|
|
||||||
|
Add the following entry to your `/etc/hosts`
|
||||||
|
|
||||||
|
```
|
||||||
|
127.0.0.1 time-tracking.local
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
This project is in a very early stage. The structure and APIs are still subject to change and not stable.
|
||||||
|
Therefore we do not currently accept any contributions, unless you are a member of the team.
|
||||||
|
|
||||||
|
As soon as we feel comfortable enough that the application structure is stable enough, we will open up the project for contributions.
|
||||||
|
|||||||
@@ -6,6 +6,15 @@ services:
|
|||||||
args:
|
args:
|
||||||
WWWGROUP: '${WWWGROUP}'
|
WWWGROUP: '${WWWGROUP}'
|
||||||
image: sail-8.3/app
|
image: sail-8.3/app
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=${NETWORK_NAME}"
|
||||||
|
- "traefik.http.routers.timetracking.rule=Host(`${NGINX_HOST_NAME}`)"
|
||||||
|
- "traefik.http.routers.timetracking.entrypoints=web"
|
||||||
|
- "traefik.http.services.timetracking.loadbalancer.server.port=80"
|
||||||
|
- "traefik.http.routers.timetracking-https.rule=Host(`${NGINX_HOST_NAME}`)"
|
||||||
|
- "traefik.http.routers.timetracking-https.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.timetracking-https.tls=true"
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- 'host.docker.internal:host-gateway'
|
- 'host.docker.internal:host-gateway'
|
||||||
ports:
|
ports:
|
||||||
@@ -21,6 +30,7 @@ services:
|
|||||||
- '.:/var/www/html'
|
- '.:/var/www/html'
|
||||||
networks:
|
networks:
|
||||||
- sail
|
- sail
|
||||||
|
- reverse-proxy
|
||||||
depends_on:
|
depends_on:
|
||||||
- pgsql
|
- pgsql
|
||||||
pgsql:
|
pgsql:
|
||||||
@@ -49,6 +59,9 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
networks:
|
networks:
|
||||||
|
reverse-proxy:
|
||||||
|
name: "${NETWORK_NAME}"
|
||||||
|
external: true
|
||||||
sail:
|
sail:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user