Update docker-compose.yml

This commit is contained in:
Stanislav Shupilkin
2019-02-27 10:44:24 +03:00
committed by Samuel Laulhau
parent 5c418c474e
commit e0fcb50ecb

View File

@@ -1,4 +1,15 @@
version: "2" version: '3.6'
volumes:
db:
storage:
logo:
public:
# uncomment if you want to use external network (example network: "web")
#networks:
# web:
# external: true
services: services:
db: db:
@@ -6,36 +17,45 @@ services:
env_file: .env env_file: .env
restart: always restart: always
volumes: volumes:
- data-volume:/var/lib/mysql - db:/var/lib/mysql
networks:
- default
app: app:
image: invoiceninja/invoiceninja image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env env_file: .env
restart: always restart: always
depends_on:
- db
volumes: volumes:
- ./srv/invoiceninja/storage:/var/www/app/storage:rw - storage:/var/www/app/storage
- ./srv/invoiceninja/logo:/var/www/app/public/logo:rw - logo:/var/www/app/public/logo
- public:/var/www/app/public
networks:
- default
web: web:
image: nginx:1 image: nginx:1
volumes: volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro
links: - storage:/var/www/app/storage
- app - logo:/var/www/app/public/logo
volumes_from: - public:/var/www/app/public
- app expose: # Expose ports without publishing them to the host machine - theyll only be accessible to linked services.
ports: - "80"
ports: # Delete if you want to use reverse proxy
- 8000:80 - 8000:80
networks:
# - web # uncomment if you want to use external network (reverse proxy for example)
- default
cron: cron:
image: invoiceninja/invoiceninja image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env env_file: .env
volumes_from: volumes:
- app - storage:/var/www/app/storage
- logo:/var/www/app/public/logo
- public:/var/www/app/public
entrypoint: | entrypoint: |
bash -c 'bash -s <<EOF bash -c 'bash -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM trap "break;exit" SIGHUP SIGINT SIGTERM
@@ -46,7 +66,5 @@ services:
sleep 1d sleep 1d
done done
EOF' EOF'
networks:
volumes: - default
data-volume: