Docker compose for dev and testing.

This commit is contained in:
Giorgos Logiotatidis 2017-11-30 13:02:00 +02:00
Родитель cfd23868a1
Коммит e40cb0ecc2
5 изменённых файлов: 25 добавлений и 9 удалений

Просмотреть файл

@ -19,3 +19,4 @@ DOMAIN=localhost
ES_URLS=elasticsearch:9200
SITE_URL=http://localhost:8000
SECRET_KEY=secret
REUSE_STATIC=1

Просмотреть файл

@ -4,14 +4,12 @@ services:
build:
context: .
cache_from:
- mozmeao/kitsune:latest
image: kitsune:latest
- mozmeao/kitsune:base-latest
- kitsune:latest
dockerfile: docker/dockerfiles/base
image: kitsune:base-latest
command: ./manage.py runserver 0.0.0.0:8000
user: ${UID:-kitsune}
volumes:
- ./:/app
- node_modules:/app/node_modules
- bower_components:/app/bower_components
depends_on:
- mariadb
- elasticsearch
@ -40,5 +38,3 @@ services:
volumes:
mysqlvolume:
node_modules:
bower_components:

Просмотреть файл

@ -0,0 +1,13 @@
version: '3.4'
services:
web:
command: ./manage.py runserver 0.0.0.0:8000
volumes:
- ./:/app
mariadb:
volumes:
- mysqlvolume:/var/lib/mysql
volumes:
mysqlvolume:

Просмотреть файл

@ -0,0 +1,6 @@
version: '3.4'
services:
web:
command: ./manage.py test --noinput --nologcapture -a '!search_tests' --with-nicedots
user: kitsune
env_file: .env-test

Просмотреть файл

@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED=1
RUN groupadd --gid 1000 kitsune && useradd -g kitsune --uid 1000 --shell /usr/sbin/nologin kitsune
# Node is used in the staticfiles dockerfile but since this base image
# is used for development get it installed here.
# is used for development get it installed here too.
RUN apt-get update && apt-get install apt-transport-https && \
echo "deb https://deb.nodesource.com/node_0.10 jessie main" >> /etc/apt/sources.list && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \