Ver código fonte

add docker compose for production

pull/342/head
Guillaume Vincent 8 anos atrás
pai
commit
b071e3dadf
4 arquivos alterados com 26 adições e 6 exclusões
  1. +1
    -1
      .gitignore
  2. +5
    -5
      .travis.yml
  3. +7
    -0
      config/config.test.ini
  4. +13
    -0
      docker-compose.production.yml

+ 1
- 1
.gitignore Ver arquivo

@@ -69,7 +69,7 @@ target/
[Ss]cripts
pyvenv.cfg
pip-selfcheck.json
/config
/config/config.ini
*.sqlite3
/frontend/node_modules
.idea/

+ 5
- 5
.travis.yml Ver arquivo

@@ -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
- mv config/config.test.ini config/config.ini
install: pip install -r requirements.dev.txt
script: python manage.py test

+ 7
- 0
config/config.test.ini Ver arquivo

@@ -0,0 +1,7 @@
[DATABASE]
engine = django.db.backends.postgresql_psycopg2
name = postgres
user = postgres
password =
host = localhost
port = 5432

+ 13
- 0
docker-compose.production.yml Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar