Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2ccfbcd5f | |||
| 459a028891 | |||
| 1c294a5ba6 |
4
Rakefile
4
Rakefile
@@ -12,12 +12,12 @@ namespace :live do
|
|||||||
|
|
||||||
desc 'monitorear salida'
|
desc 'monitorear salida'
|
||||||
task :tail do
|
task :tail do
|
||||||
compose('logs', '-f', 'django', compose: DOCKER_COMPOSE)
|
compose('logs', '-f', 'frontend', compose: DOCKER_COMPOSE)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'monitorear salida'
|
desc 'monitorear salida'
|
||||||
task :tail_end do
|
task :tail_end do
|
||||||
compose('logs', '-f', '-n 50', 'django', compose: DOCKER_COMPOSE)
|
compose('logs', '-f', '-n 50', 'frontend', compose: DOCKER_COMPOSE)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'iniciar entorno'
|
desc 'iniciar entorno'
|
||||||
|
|||||||
@@ -7,4 +7,7 @@ services:
|
|||||||
- ./:/app/
|
- ./:/app/
|
||||||
ports:
|
ports:
|
||||||
- "7001:3000"
|
- "7001:3000"
|
||||||
|
environment:
|
||||||
|
- VITE_DJANGO_BASE_URL=http://localhost:7000
|
||||||
|
- VITE_API_IMPLEMENTATION=django
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Api from './api';
|
|||||||
|
|
||||||
class ApiImplementation {
|
class ApiImplementation {
|
||||||
constructor() {
|
constructor() {
|
||||||
const implementation = process.env.API_IMPLEMENTATION;
|
const implementation = import.meta.env.VITE_API_IMPLEMENTATION;
|
||||||
let apiImplementation;
|
let apiImplementation;
|
||||||
if (implementation === 'django') {
|
if (implementation === 'django') {
|
||||||
apiImplementation = new DjangoApi();
|
apiImplementation = new DjangoApi();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class DjangoApi {
|
class DjangoApi {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.base = process.env.DJANGO_BASE_URL;
|
this.base = import.meta.env.VITE_DJANGO_BASE_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomers() {
|
getCustomers() {
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: { 'process.env': {
|
define: { 'process.env': {
|
||||||
API_IMPLEMENTATION: 'django',
|
|
||||||
DJANGO_BASE_URL: 'http://localhost:7000'
|
|
||||||
} },
|
} },
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|||||||
Reference in New Issue
Block a user