forked from akeeba/panopticon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (88 loc) · 3.41 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
################################################################################
## Akeeba Panopticon
## (c) 2023-2023 Nicholas K. Dionysopoulos / Akeeba Ltd
## Licensed under the GNU Affero General Public License, version 3 or later
## <https://www.gnu.org/licenses/agpl-3.0.txt>
##
## -----------------------------------------------------------------------------
##
## Sample Docker Compose file, using Apache
##
## Use this Docker Compose file to set up your own installation of Akeeba
## Panopticon. Read the comments in this file to understand what to configure.
##
################################################################################
version: "3.5"
# These are environment variables configuring the creation of and connection to the Panopticon database.
x-db-variables: &db-variables
# The name of the container where the database server lives in. Do not change.
PANOPTICON_DB_HOST: "mysql"
# The database table prefix. Two to five lowercase letters and/or numbers, followed by an underscore.
# It must NOT start with a number. Best leave it as-is.
PANOPTICON_DB_PREFIX: "pnptc_"
# The name of the MySQL database. Best leave it as-is.
MYSQL_DATABASE: "panopticon"
# The name of the MySQL user. Best leave it as-is.
MYSQL_USER: "panopticon"
# The password of the MySQL user. You SHOULD change this to something random. You can create a random password here:
# https://www.random.org/passwords/?num=1&len=32&format=html&rnd=new
MYSQL_PASSWORD: "Emx6Rf9mtneXNgpZyehvdm8NUJJMJQA8"
services:
# The web application container, based on Apache with PHP-FPM
php:
build:
context: '.'
dockerfile: Dockerfile
args:
PHP_VERSION: 8.2
# If you want to use the pre-made images, uncomment this line and remove the `build` section.
#image: ghcr.io/akeeba/panopticon:latest
depends_on:
wait-for-db:
condition: service_completed_successfully
links:
- mysql
# This exposes the internal web server ports (80 and 443) to your host as ports 4280 and 4443 respectively.
# You may want to change that to 80:80 and 443:443 for live deployments.
ports:
- 4280:80
- 4443:443
volumes:
- panopticon_usercode:/var/www/html/user_code
container_name: panopticon_php
restart: always
environment:
<<: *db-variables
# Your username. You should change this.
ADMIN_USERNAME: "admin"
# Your password. Best create a random one here: # https://www.random.org/passwords/?num=1&len=32&format=html&rnd=new
ADMIN_PASSWORD: "admin"
# Your full name.
ADMIN_NAME: "Super Administrator"
# Your email address.
ADMIN_EMAIL: "admin@example.com"
# The database server container.
mysql:
image: mysql:8.0
command:
- --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- panopticon_mysql:/var/lib/mysql
environment:
<<: *db-variables
TZ: "Asia/Nicosia"
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
container_name: panopticon_mysql
# Used to start the web application container only after the database container is up and running.
wait-for-db:
image: atkrad/wait4x
depends_on:
- mysql
command: tcp mysql:3306 -t 30s -i 250ms
# These are the Docker volumes storing persistent data.
volumes:
# User-provided code. It's mounted in the user_code folder of the application.
panopticon_usercode:
# The MySQL data directory
panopticon_mysql: