diff --git a/.gitignore b/.gitignore index 7323d4f..c37c97d 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ target/ [Ss]cripts pyvenv.cfg pip-selfcheck.json -/config +/config/config.ini *.sqlite3 /frontend/node_modules .idea/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 5a22598..71a2a4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,11 @@ language: python python: - 3.4 - 3.5 -install: pip install -r requirements.dev.txt -script: python manage.py test -services: - - postgresql addons: postgresql: "9.5" +services: + - postgresql before_script: - - psql -c 'create database db;' -U postgres \ No newline at end of file + - mv config/config.test.ini config/config.ini +install: pip install -r requirements.dev.txt +script: python manage.py test diff --git a/config/config.test.ini b/config/config.test.ini new file mode 100644 index 0000000..0666335 --- /dev/null +++ b/config/config.test.ini @@ -0,0 +1,7 @@ +[DATABASE] +engine = django.db.backends.postgresql_psycopg2 +name = postgres +user = postgres +password = +host = localhost +port = 5432 \ No newline at end of file diff --git a/docker-compose.production.yml b/docker-compose.production.yml new file mode 100644 index 0000000..ac69f90 --- /dev/null +++ b/docker-compose.production.yml @@ -0,0 +1,13 @@ +db: + image: postgres:9.5 + restart: always + volumes: + - dbdata:/var/lib/postgresql/data +web: + restart: always + image: oslab/lesspass-drf + command: ./start.sh + ports: + - "8000:8000" + links: + - db