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 { http://project.localhost {
reverse_proxy gulp:3000
}
http://django.localhost {
root * /usr/src/app/ root * /usr/src/app/
encode gzip zstd encode gzip zstd
@ -13,6 +17,10 @@ http://project.localhost {
file_server /media/* file_server /media/*
} }
http://gulp-socket.localhost {
reverse_proxy gulp:3001
}
http://webmail.localhost { http://webmail.localhost {
reverse_proxy mailhog:8025 reverse_proxy mailhog:8025
} }

View File

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

View File

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

View File

@ -113,10 +113,15 @@
content="" content=""
> >
<link <link
rel="stylesheet" href="{% static 'css/mobile.css' %}"
type="text/css" rel="stylesheet"
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> </head>
<body> <body>
{% block content %}{% endblock %} {% block content %}{% endblock %}