Make the new admin available with docker compose

This commit is contained in:
Gaëtan L
2023-02-16 15:31:42 +01:00
parent a08bf13171
commit 3145f10bd4
4 changed files with 28 additions and 41 deletions
-24
View File
@@ -1,24 +0,0 @@
FROM python:3.9-alpine as base
MAINTAINER Antoine Nguyen <tonio@ngyn.org>
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
FROM base as build
RUN apk add --update openssl librrd python3-dev libffi-dev gcc g++ musl-dev libxml2-dev libxslt-dev \
libressl-dev jpeg-dev rrdtool-dev file make \
&& rm -rf /var/cache/apk/*
RUN python3 -m venv $VIRTUAL_ENV
WORKDIR /tmp
COPY requirements.txt /tmp
COPY test-requirements.txt /tmp
RUN python -m pip install -U pip
RUN pip install -r requirements.txt -r test-requirements.txt
FROM base as run
COPY --from=build $VIRTUAL_ENV $VIRTUAL_ENV
RUN apk add --no-cache --update librrd libxslt libjpeg libressl git rrdtool \
&& rm -rf /var/cache/apk/*
RUN mkdir /code
WORKDIR /code
+1 -1
View File
@@ -17,7 +17,7 @@ Then, just run the following command::
$ docker-compose up
It will start the docker environment and make a Modoboa instance
available at ``http://localhost:8000``.
available at ``http://localhost:8000`` and the new admin interface at ``http://localhost:8080``
If you don't want to use docker or need a more complex development
setup, go to the next section.
+19 -4
View File
@@ -2,13 +2,13 @@ version: '3'
services:
web:
container_name: modoboa_api
restart: always
build:
context: .
dockerfile: Dockerfile.dev
expose:
- "8000"
dockerfile: docker/Dockerfile.dev
ports:
- "8000:8000"
- 8000:8000
environment:
PYTHONPATH: ".."
DB: "SQLITE"
@@ -16,3 +16,18 @@ services:
command: sh -c "cd test_project && python3 manage.py migrate && python3 manage.py load_initial_data && python3 manage.py runserver 0:8000"
volumes:
- .:/code
new_admin:
container_name: modoboa_new_admin
restart: always
build:
context: .
dockerfile: docker/Dockerfile.admin.dev
ports:
- 8080:8080
command: ""
volumes:
- ./frontend/:/home/node/
command: "yarn serve"
depends_on:
- web
+8 -12
View File
@@ -1,16 +1,12 @@
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8000/'
}
}
"/api": {
target: "http://localhost:8000/",
},
},
},
transpileDependencies: [
'vuetify'
],
publicPath: process.env.NODE_ENV === 'production'
? '/new-admin/'
: '/',
outputDir: '../modoboa/frontend_dist'
}
transpileDependencies: ["vuetify"],
publicPath: process.env.NODE_ENV === "production" ? "/new-admin/" : "/",
outputDir: "../modoboa/frontend_dist",
};