This commit is contained in:
Andros Fenollosa 2023-07-24 14:48:40 +02:00
parent 4569bd741c
commit 55c17554f1
4 changed files with 43 additions and 8 deletions

View File

@ -1,4 +1,8 @@
http://project.localhost {
reverse_proxy gulp:3000
}
http://django.localhost {
root * /usr/src/app/
encode gzip zstd
@ -13,6 +17,10 @@ http://project.localhost {
file_server /media/*
}
http://gulp-socket.localhost {
reverse_proxy gulp:3001
}
http://webmail.localhost {
reverse_proxy mailhog:8025
}

View File

@ -12,6 +12,8 @@ services:
POSTGRES_DB: ${DB_NAME}
ports:
- ${DB_PORT}:5432
networks:
default:
django:
build:
@ -30,6 +32,8 @@ services:
- postgresql
links:
- redis
networks:
default:
caddy:
image: caddy:alpine
@ -44,6 +48,10 @@ services:
- .:/usr/src/app/
depends_on:
- django
networks:
default:
aliases:
- django.localhost
redis:
image: redis:alpine
@ -51,6 +59,8 @@ services:
restart: "no"
expose:
- ${REDIS_PORT}
networks:
default:
mailhog:
image: mailhog/mailhog:latest
@ -58,15 +68,23 @@ services:
restart: "no"
expose:
- 1025
networks:
default:
gulp:
build:
context: ./
dockerfile: ./Dockerfiles/gulp/Dockerfile
container_name: ${PROJECT_NAME}-gulp
entrypoint: gulp
entrypoint: gulp dev
restart: "no"
expose:
- 3000
- 3001
volumes:
- .:/usr/src/app/
- /usr/src/app/node_modules
depends_on:
- caddy
networks:
default:

View File

@ -29,7 +29,11 @@ function initBrowserSync(cb) {
browserSync.init({
notify: false,
open: false,
proxy: 'http://localhost'
proxy: 'http://django.localhost',
ws: true,
socket: {
domain: 'gulp-socket.localhost'
}
});
return cb;
}

View File

@ -113,9 +113,14 @@
content=""
>
<link
href="{% static 'css/mobile.css' %}"
rel="stylesheet"
type="text/css"
href="{% static 'css/main.css' %}"
media="all and (max-width: 600px)"
>
<link
href="{% static 'css/desktop.css' %}"
rel="stylesheet"
media="all and (min-width: 600px)"
>
</head>
<body>