forked from ampache/ampache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (59 loc) · 2.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (59 loc) · 2.1 KB
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
name: ampache
services:
ampache:
build:
context: .
dockerfile: docker/Dockerfilephp85
container_name: ampache
restart: on-failure
depends_on:
db:
condition: service_healthy
ports:
- "8084:80"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
# live-mount the whole repo so code edits are picked up immediately
- ./:/var/www/html
- ./docker/log:/var/log/ampache
# drop media into docker/media on the host; add a catalog pointing at /media in Ampache
- ./docker/media:/media
environment:
DISABLE_INOTIFYWAIT_CLEAN: ${DISABLE_INOTIFYWAIT_CLEAN-0}
# Database connection used for the first-run auto-install (see docker/data/bin/run.sh).
# DB_USER/DB_PASSWORD are admin creds used to create the schema; AMPACHE_DB_USER/PASSWORD
# are the app creds written into config/ampache.cfg.php.
# Leave DB_NAME empty to skip auto-install and use the web installer instead.
DB_HOST: ${DB_HOST-db}
DB_PORT: ${DB_PORT-3306}
DB_NAME: ${DB_NAME-ampache}
DB_USER: ${DB_USER-root}
DB_PASSWORD: ${DB_PASSWORD-ampache}
AMPACHE_DB_USER: ${AMPACHE_DB_USER-ampache}
AMPACHE_DB_PASSWORD: ${AMPACHE_DB_PASSWORD-ampache}
# Optional first-run admin account (omit AMPACHE_ADMIN_USER to skip)
AMPACHE_ADMIN_USER: ${AMPACHE_ADMIN_USER-admin}
AMPACHE_ADMIN_PASSWORD: ${AMPACHE_ADMIN_PASSWORD-admin}
AMPACHE_ADMIN_EMAIL: ${AMPACHE_ADMIN_EMAIL-admin@example.com}
db:
image: mariadb:lts
container_name: ampache-db
restart: on-failure
ports:
# exposed on the host so you can connect with an external DB tool
- "3306:3306"
environment:
MARIADB_ROOT_PASSWORD: ${DB_PASSWORD-ampache}
MARIADB_DATABASE: ${DB_NAME-ampache}
MARIADB_USER: ${AMPACHE_DB_USER-ampache}
MARIADB_PASSWORD: ${AMPACHE_DB_PASSWORD-ampache}
volumes:
- db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 20
volumes:
db-data: