74 lines
2.1 KiB
Plaintext
74 lines
2.1 KiB
Plaintext
#
|
|
# docker-compose.yml
|
|
#
|
|
# Copyright (C) 2020-2021 Franco Masotti (franco \D\o\T masotti {-A-T-} tutanota \D\o\T com)
|
|
#
|
|
# This file is part of django-futils.
|
|
#
|
|
# django-futils is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# django-futils is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with django-futils. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
version: '3.8'
|
|
|
|
volumes:
|
|
redis:
|
|
|
|
services:
|
|
dependencies:
|
|
image: docker_debian_postgis_django
|
|
build:
|
|
context: https://software.franco.net.eu.org/frnmst/docker-debian-postgis-django.git#6.0.1
|
|
dockerfile: Dockerfile.dist
|
|
|
|
redis:
|
|
image: ${DOCKER_REGISTRY}/redis:6.2.5
|
|
restart: always
|
|
hostname: redis
|
|
|
|
db:
|
|
# See
|
|
# https://github.com/frnmst/docker-debian-postgis-django/blob/master/README.md#database
|
|
|
|
# https://github.com/postgis/docker-postgis
|
|
image: ${DOCKER_REGISTRY}/postgis/postgis:13-3.1
|
|
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASS}
|
|
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
|
|
- EXISTING_DATA_DIR=true
|
|
restart: on-failure
|
|
|
|
# Enable access to the database from localhost only.
|
|
ports:
|
|
- "127.0.0.1:${POSTGRES_EXPOSED_PORT}:${POSTGRES_GUEST_PORT}"
|
|
|
|
web_build:
|
|
image: django_futils_web
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: on-failure
|
|
links:
|
|
- db
|
|
depends_on:
|
|
- dependencies
|
|
|
|
web:
|
|
image: django_futils_web
|
|
restart: on-failure
|
|
links:
|
|
- db
|
|
- redis
|