version: '2' services: db: restart: always image: postgres:9.5 volumes: - postgresql:/var/lib/postgresql/data environment: POSTGRES_DB: 'lesspass' POSTGRES_USER: 'lesspass' POSTGRES_PASSWORD: ${DATABASE_PASSWORD} backend: restart: always image: lesspass/backend:latest expose: - '8000' volumes: - www:/backend/www depends_on: - db env_file: - .env environment: DATABASE_ENGINE: 'django.db.backends.postgresql' DATABASE_NAME: 'lesspass' DATABASE_USER: 'lesspass' DATABASE_HOST: 'db' DATABASE_PORT: '5432' frontend: restart: always image: lesspass/frontend:latest nginx: restart: always image: lesspass/nginx:latest ports: - '80:80' - '443:443' volumes_from: - backend volumes: - ./ssl:/certificates links: - backend - frontend environment: - DOMAIN=${DOMAIN} volumes: postgresql: www: