Ostatnio aktywny 1765244762

000-default.conf Surowy
1<VirtualHost *:8080>
2 # The ServerName directive sets the request scheme, hostname and port that
3 # the server uses to identify itself. This is used when creating
4 # redirection URLs. In the context of virtual hosts, the ServerName
5 # specifies what hostname must appear in the request's Host: header to
6 # match this virtual host. For the default virtual host (this file) this
7 # value is not decisive as it is used as a last resort host regardless.
8 # However, you must set it for any further virtual host explicitly.
9 #ServerName www.example.com
10
11 ServerAdmin webmaster@localhost
12 DocumentRoot /var/www/html/public
13 ServerName localhost
14
15 # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
16 # error, crit, alert, emerg.
17 # It is also possible to configure the loglevel for particular
18 # modules, e.g.
19 #LogLevel info ssl:warn
20
21 # <Directory "/var/www/html/public">
22 # DirectoryIndex index.php
23 # AllowOverride All
24 # Options FollowSymlinks
25 # Require all granted
26 # </Directory>
27
28 ErrorLog ${APACHE_LOG_DIR}/error.log
29 CustomLog ${APACHE_LOG_DIR}/access.log combined
30
31 # For most configuration files from conf-available/, which are
32 # enabled or disabled at a global level, it is possible to
33 # include a line for only one particular virtual host. For example the
34 # following line enables the CGI configuration for this host only
35 # after it has been globally disabled with "a2disconf".
36 #Include conf-available/serve-cgi-bin.conf
37</VirtualHost>
Dockerfile Surowy
1FROM mcr.microsoft.com/devcontainers/php:dev-8.4-apache-bullseye
2
3# Install MariaDB client
4RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5 && apt-get install -y mariadb-client postgresql-client libpq-dev
6
7RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql
8
9RUN a2enmod rewrite headers
10
11RUN set -eux; \
12 XSO="$(find /usr/local/lib/php/extensions -type f -name 'xdebug*.so' -print -quit 2>/dev/null || true)"; \
13 if [ -n "$XSO" ]; then \
14 printf 'zend_extension="%s"\n' "$XSO" > /usr/local/etc/php/conf.d/zz-xdebug-auto.ini; \
15 fi
devcontainer.json Surowy
1{
2 "name": "Order System Backend",
3 "build": {
4 "dockerfile": "Dockerfile",
5 "context": ".."
6 },
7 "workspaceFolder": "/workspace",
8 "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
9 "features": {
10 "ghcr.io/devcontainers/features/common-utils:2": {},
11 "ghcr.io/devcontainers/features/git:1": {}
12 },
13 "customizations": {
14 "vscode": {
15 "settings": {},
16 "extensions": [
17 "GitHub.copilot",
18 "xdebug.php-pack",
19 "junstyle.php-cs-fixer"
20 ]
21 }
22 },
23 "forwardPorts": [
24 8080
25 ],
26 "postCreateCommand": "git config oh-my-zsh.hide-info 1 && sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html && apache2ctl start",
27 "portsAttributes": {
28 "8080": {
29 "label": "PHP Artisan Serve",
30 "onAutoForward": "notify"
31 }
32 },
33 "mounts": [
34 "source=${localWorkspaceFolder}/.devcontainer/xdebug.ini,target=/usr/local/etc/php/conf.d/xdebug.ini,type=bind,consistency=cached",
35 "source=${localWorkspaceFolder}/.devcontainer/000-default.conf,target=/etc/apache2/sites-available/000-default.conf,type=bind,consistency=cached"
36 ]
37}
xdebug.ini Surowy
1xdebug.mode = debug
2xdebug.start_with_request = no
3xdebug.client_port = 9000