forked from invoiceninja/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (84 loc) · 2.66 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '3.7'
services:
server:
image: caddy:alpine
restart: always
environment:
- APP_URL=https://localhost
volumes:
# Vhost configuration
- ./config/caddy/Caddyfile:/etc/caddy/Caddyfile
# Configure your mounted directories, make sure the folder 'public' and 'storage'
# exist, before mounting them
- public:/var/www/app/public
- storage:/var/www/app/storage
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/app/public:/var/www/app/public:rw,delegated
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
depends_on:
- app
# Run webserver nginx on port 80
# Feel free to modify depending what port is already occupied
ports:
- "80:80"
- "443:443"
networks:
- invoiceninja
app:
image: invoiceninja/invoiceninja:5
restart: always
environment:
- APP_URL=https://localhost
- APP_KEY=<INSERT THE GENERATED APPLICATION KEY HERE>
- MULTI_DB_ENABLED=false
- DB_HOST1=db
volumes:
# Configure your mounted directories, make sure the folder 'public' and 'storage'
# exist, before mounting them
- public:/var/www/app/public
- storage:/var/www/app/storage
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/app/public:/var/www/app/public:rw,delegated
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
depends_on:
- db
networks:
- invoiceninja
db:
image: mysql:5
restart: always
environment:
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=db-ninja-01
volumes:
- mysql-data:/var/lib/mysql:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/mysql/data:/var/lib/mysql:rw,delegated
networks:
- invoiceninja
# cron:
# image: invoiceninja/invoiceninja
# volumes:
# - storage:/var/www/app/storage
# - logo:/var/www/app/public/logo
# - public:/var/www/app/public
# entrypoint: |
# bash -c 'bash -s <<EOF
# trap "break;exit" SIGHUP SIGINT SIGTERM
# sleep 300s
# while /bin/true; do
# ./artisan ninja:send-invoices
# ./artisan ninja:send-reminders
# sleep 1d
# done
# EOF'
# networks:
# - invoiceninja
volumes:
mysql-data:
public:
storage:
networks:
invoiceninja: