mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Make the new admin available with docker compose
This commit is contained in:
@@ -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
|
||||
@@ -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
@@ -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
@@ -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",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user