Merge pull request #2784 from modoboa/feature/add_new_admin_docker_compose

Make the new admin available with docker compose
This commit is contained in:
Antoine Nguyen
2023-02-16 17:18:36 +01:00
committed by GitHub
8 changed files with 50 additions and 18 deletions
+3
View File
@@ -28,3 +28,6 @@ test_project/modoboa.db
/.project
/.pydevproject
# Misc
.ash_history
+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.
+22 -5
View File
@@ -1,14 +1,14 @@
version: '3'
services:
web:
api:
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,20 @@ 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
front:
container_name: modoboa_front
restart: always
build:
context: .
dockerfile: docker/Dockerfile.front.dev
ports:
- 8080:8080
command: ""
volumes:
- ./frontend/:/home/node/
command: "yarn serve"
environment:
DOCKER: "yes"
depends_on:
- api
+7
View File
@@ -0,0 +1,7 @@
FROM node:16.10-alpine
ENV HOME=/home/node/
WORKDIR $HOME
RUN yarn install
+5
View File
@@ -0,0 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
lastUpdateCheck 1676556135834
+11 -12
View File
@@ -1,16 +1,15 @@
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8000/'
}
}
"/api": {
target:
process.env.DOCKER == "yes"
? "http://api:8000/"
: "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",
};
+1
View File
@@ -28,6 +28,7 @@ SECRET_KEY = '!8o(-dbbl3e+*bh7nx-^xysdt)1gso*%@4ze4-9_9o+i&t--u_'
DEBUG = 'DEBUG' in os.environ
ALLOWED_HOSTS = [
'api',
'127.0.0.1',
'localhost',
]