layerindex-web/docker-compose.yml
Paul Eggleton 8e03a89a10 docker: Add docker-compose file
This makes deployment (and updates) much easier. You still need to
follow some setup instructions in the docker/README file, but the number
of steps is reduced and most commands simplified.

Thanks to Konrad Scherer <Konrad.Scherer@windriver.com> for suggesting
this (although the docker-compose.yml here was written from scratch).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-30 11:32:39 +12:00

66 lines
1.6 KiB
YAML

version: '3'
services:
layersdb:
image: mariadb:10.2
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_DATABASE=layersdb
- MYSQL_ROOT_PASSWORD=testingpw
container_name: layersdb
layersapp:
depends_on:
- layersdb
build: .
image: halstead/layerindex-app
hostname: localhost
volumes:
- layersmeta:/opt/workdir
environment:
#- SECRET_KEY=<set this here>
- DATABASE_PASSWORD=testingpw
- DATABASE_HOST=layersdb
#- EMAIL_HOST=<set this here>
#- DEBUG=1
container_name: layersapp
layersweb:
depends_on:
- layersapp
build:
context: .
dockerfile: Dockerfile.web
image: halstead/layerindex-web
hostname: localhost
ports:
- "8080:80"
## For production you want these instead
# - "80:80"
# - "443:443"
volumes:
- layersstatic:/usr/share/nginx/html
# - layerscerts:/etc/letsencrypt
container_name: layersweb
layersrabbit:
image: rabbitmq:alpine
container_name: layersrabbit
layerscelery:
depends_on:
- layersdb
- layersapp
- layersrabbit
image: halstead/layerindex-app
volumes:
- layersmeta:/opt/workdir
environment:
#- SECRET_KEY=<set this here>
- DATABASE_PASSWORD=testingpw
- DATABASE_HOST=layersdb
#- EMAIL_HOST=<set this here>
#- DEBUG=1
container_name: layerscelery
command: /usr/local/bin/celery -A layerindex.tasks worker --loglevel=info --workdir=/opt/layerindex
volumes:
layersmeta:
layersstatic:
layerscerts: