Skip to content

Commit

Permalink
Update configs to allow access to vite via docker
Browse files Browse the repository at this point in the history
  • Loading branch information
V13Axel committed Jul 4, 2024
1 parent 2b72421 commit 5eb295c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 2 additions & 4 deletions aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ alias npm='docker run -it -u $(id -u):$(id -g) -v "${PWD}/:/app" -w /app node:20
alias npx='docker run -it -e AWS_PROFILE=fc -u $(id -u):$(id -g) -v "${PWD}/:/app" -v ~/.aws/:/home/node/.aws -w /app node:20 npx'
alias node='docker run -it -u $(id -u):$(id -g) -v "${PWD}/:/app" -w /app node:20'
alias artisan='docker compose exec php php artisan'
alias fc_up='FC_WEB_PORT=9987 FC_BROWSERSYNC_PORT=9980 FC_BROWSERSYNC=true docker compose up'
alias fc_nohot='docker compose up'
alias fc_upd='FC_WEB_PORT=9987 FC_BROWSERSYNC_PORT=9980 FC_BROWSERSYNC=true docker compose up -d'
alias fc_nohotd='docker compose up -d'
alias fc_up='docker compose up'
alias fc_upd='docker compose up -d'
alias docker-clean='docker compose down && docker stop $(docker ps -a -q) && docker system prune -a -f && composer install && docker compose build'

function composer() {
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ services:
user: "${FC_USER_ID:-1000}:${FC_GROUP_ID:-1000}"
mem_limit: 2048m
ports:
- ${FC_BROWSERSYNC_PORT:-9987}:9980
- "9988:3001"
- ${FORWARD_VITE_PORT:-5173}:5173
working_dir: "/fantasy-calendar"
volumes:
- ./:/fantasy-calendar
command: ["npm", "run", "watch"]
command: ["npm", "run", "dev"]
environment:
- BROWSERSYNC=${FC_BROWSERSYNC:-false}
- "MIXVERSION=true"
Expand Down
6 changes: 6 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import {defineConfig} from "vite";
import laravel from "laravel-vite-plugin";

export default defineConfig({
server: {
host: '0.0.0.0',
hmr: {
host: 'localhost',
}
},
plugins: [
laravel([
'resources/js/jquery.js',
Expand Down

0 comments on commit 5eb295c

Please sign in to comment.