2024-03-07 22:24:04 -03:00
|
|
|
# CMS Transporte
|
|
|
|
|
|
|
|
|
|
|
|
## Developing
|
|
|
|
|
|
|
|
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm run dev
|
|
|
|
|
|
|
|
# or start the server and open the app in a new browser tab
|
|
|
|
npm run dev -- --open
|
|
|
|
```
|
|
|
|
|
|
|
|
## Building
|
|
|
|
|
|
|
|
To create a production version of your app:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm run build
|
|
|
|
```
|
|
|
|
|
|
|
|
You can preview the production build with `npm run preview`.
|
|
|
|
|
|
|
|
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
|
|
|
|
|
|
|
|
|
|
|
## file: docker-compose.yml (desarrollo)
|
|
|
|
|
|
|
|
~~~yml
|
|
|
|
version: '3'
|
|
|
|
name: transporte-cms
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
app:
|
|
|
|
image: node:20-alpine
|
|
|
|
volumes:
|
|
|
|
- ./app:/app
|
|
|
|
working_dir: /app
|
|
|
|
ports:
|
|
|
|
- 4002:4002
|
|
|
|
environment:
|
|
|
|
- PORT=4002
|
|
|
|
command: sh -c "
|
|
|
|
[ -d node_modules ] || (npm install) ;
|
|
|
|
npm run dev
|
|
|
|
"
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
|
|
## file: docker-compose.yml (producción)
|
|
|
|
|
|
|
|
~~~yml
|
|
|
|
version: '3'
|
|
|
|
name: transporte-cms
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
app:
|
|
|
|
image: node:20-alpine
|
|
|
|
volumes:
|
|
|
|
- ./app:/app
|
|
|
|
working_dir: /app
|
|
|
|
ports:
|
|
|
|
- 4002:4002
|
|
|
|
environment:
|
|
|
|
- PORT=4002
|
2024-03-14 20:23:14 -03:00
|
|
|
- VITE_TRANSPORTE_API=https://transporte.hz.kursor.cl/api
|
|
|
|
- VITE_TRANSPORTE_USER=11111111-1
|
|
|
|
- VITE_TRANSPORTE_PASS=usuario1
|
2024-03-07 22:24:04 -03:00
|
|
|
command: sh -c "
|
|
|
|
[ -d node_modules ] || (npm install) ;
|
|
|
|
npm run build && npm run preview
|
|
|
|
"
|
|
|
|
~~~
|