add docker env for integration testing
This commit is contained in:
parent
269f02c2ce
commit
0c4995db2b
6 changed files with 101 additions and 1 deletions
55
deploy/testing/docker-compose.yml
Normal file
55
deploy/testing/docker-compose.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
services:
|
||||
redis:
|
||||
image: redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
environment:
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: true
|
||||
MARIADB_DATABASE: system3
|
||||
MARIADB_USER: system3
|
||||
MARIADB_PASSWORD: system3
|
||||
volumes:
|
||||
- mariadb_data:/var/lib/mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
|
||||
core:
|
||||
build:
|
||||
context: ../../core
|
||||
dockerfile: ../deploy/testing/Dockerfile.backend
|
||||
command: bash -c 'python manage.py migrate && python /code/server.py'
|
||||
environment:
|
||||
- HTTP_HOST=core
|
||||
- REDIS_HOST=redis
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_NAME=system3
|
||||
- DB_USER=system3
|
||||
- DB_PASSWORD=system3
|
||||
volumes:
|
||||
- ../../core:/code
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ../../web
|
||||
dockerfile: ../deploy/testing/Dockerfile.frontend
|
||||
command: npm run serve
|
||||
volumes:
|
||||
- ../../web:/web:ro
|
||||
- /web/node_modules
|
||||
- ./vue.config.js:/web/vue.config.js
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- core
|
||||
|
||||
volumes:
|
||||
mariadb_data:
|
Loading…
Add table
Add a link
Reference in a new issue