-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
98 lines (90 loc) · 2.11 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
93
94
95
96
97
98
version: '3'
services:
db:
container_name: nc-db
hostname: nc_db
image: postgres:14
restart: always
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_PASSWORD: ${DATABASE_PWD}
volumes:
- db:/var/lib/postgresql/data
ports:
- "15432:5432"
app:
container_name: nc-app
build: ./
volumes:
- nextcloud:/usr/src/nextcloud
environment:
- POSTGRES_HOST=${DATABASE_HOST}
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PWD}
- REDIS_HOST=${REDIS_HOST}
- REDIS_HOST_PASSWORD=${REDIS_PASSWORD}
- DEFAULT_PHONE_REGION=FR
depends_on:
- db
- redis
cron:
container_name: nc-cron
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
nc-web:
container_name: nc-web
build:
context: ./nginx
restart: always
environment:
- VIRTUAL_HOST=${CLOUD_HOST}
volumes:
- ./nginx/conf.d/:/etc/nginx/conf.d
- ./certbot/conf/:/etc/nginx/ssl/:ro
- ./certbot/www:/var/www/certbot/:ro
- nextcloud:/var/www/html
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/sites/:/etc/nginx/sites-available
- ./nginx/logs:/var/log/nginx
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- app
networks:
- proxy-tier
- default
ports:
- "8888:80"
- "443:443"
redis:
container_name: nc-redis
image: "redis:alpine"
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- "6379:6379"
volumes:
- ./redis/data:/var/lib/redis
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
certbot:
container_name: nc-certbot
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
networks:
- proxy-tier
depends_on:
- nc-web
volumes:
db:
nextcloud:
networks:
proxy-tier: