forked from akeeba/panopticon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-frankenphp.yml
More file actions
102 lines (98 loc) · 4.13 KB
/
Copy pathdocker-compose-frankenphp.yml
File metadata and controls
102 lines (98 loc) · 4.13 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
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
99
100
101
102
################################################################################
## 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 FrankenPHP
##
## 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 FrankenPHP (https://frankenphp.dev).
php:
# If you are using a development / customised installation built from sources use the `build` section.
build:
context: '.'
dockerfile: frankenphp.Dockerfile
container_name: panopticon_php
depends_on:
wait-for-db:
condition: service_completed_successfully
restart: always
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:/app/public/user_code
# comment the following line in production, it allows to have nice human-readable logs in dev
tty: true
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"
## Global Caddy options, see https://caddyserver.com/docs/caddyfile/options – parsed before the frankenphp global option
#CADDY_GLOBAL_OPTIONS: ""
## FrankenPHP config options, see https://frankenphp.dev/docs/config/#environment-variables
## NOTE: You should NOT need that to run Panopticon
#FRANKENPHP_CONFIG: ""
## Like CADDY_GLOBAL_OPTIONS, but they are parsed AFTER the frankenphp global option
#CADDY_EXTRA_CONFIG: ""
## The hostname of the server. Default to localhost
#SERVER_NAME: "localhost"
## Caddy directives located inside the default domain section
#CADDY_SERVER_EXTRA_DIRECTIVES: ""
# The database server container.
mysql:
image: mysql:8.0
container_name: panopticon_mysql
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"
# 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: