Compare commits
No commits in common. "e88ca59e066058c83410c2bb9aeafd08e082df0e" and "b959d2e300dbdc193f3ecf7021dd609c1e4875fa" have entirely different histories.
e88ca59e06
...
b959d2e300
|
@ -1,40 +0,0 @@
|
|||
### Symfony template
|
||||
# Cache and logs (Symfony2)
|
||||
/app/cache/*
|
||||
/app/logs/*
|
||||
!app/cache/.gitkeep
|
||||
!app/logs/.gitkeep
|
||||
|
||||
# Cache, session files and logs (Symfony3)
|
||||
/var/cache/*
|
||||
/var/sessions/*
|
||||
!var/cache/.gitkeep
|
||||
!var/sessions/.gitkeep
|
||||
|
||||
# Logs (Symfony4)
|
||||
/var/log/*
|
||||
!var/log/.gitkeep
|
||||
|
||||
# Managed by Composer
|
||||
/app/bootstrap.php.cache
|
||||
/var/bootstrap.php.cache
|
||||
/bin/*
|
||||
!bin/console
|
||||
!bin/symfony_requirements
|
||||
/vendor/
|
||||
|
||||
# PHPUnit
|
||||
/app/phpunit.xml
|
||||
/phpunit.xml
|
||||
|
||||
# Composer PHAR
|
||||
/composer.phar
|
||||
|
||||
# Backup entities generated with doctrine:generate:entities command
|
||||
**/Entity/*~
|
||||
|
||||
# Embedded web-server pid file
|
||||
/.web-server-pid
|
||||
|
||||
# DotEnv
|
||||
.env.local
|
2
.env
2
.env
|
@ -3,7 +3,7 @@
|
|||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
APP_ENV=prod
|
||||
APP_ENV=dev
|
||||
APP_SECRET=xxx
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
|
|
9
.rr.yaml
9
.rr.yaml
|
@ -1,11 +1,12 @@
|
|||
# https://roadrunner.dev/docs/intro-config/2.x/en
|
||||
version: "2.7"
|
||||
|
||||
server:
|
||||
command: "php public/index.php"
|
||||
# If you are not using symfony 5.3+ and the new Runtime component:
|
||||
# remove the previous `command` line above and uncomment the line below to use the deprecated command.
|
||||
# command: "php bin/console baldinof:roadrunner:worker"
|
||||
env:
|
||||
- APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime
|
||||
- APP_ENV: prod
|
||||
|
||||
http:
|
||||
address: 0.0.0.0:8080
|
||||
|
@ -15,10 +16,6 @@ http:
|
|||
static:
|
||||
dir: "public"
|
||||
forbid: [ ".php", ".htaccess" ]
|
||||
pool:
|
||||
max_jobs: 16
|
||||
supervisor:
|
||||
max_worker_memory: 256
|
||||
|
||||
logs:
|
||||
mode: production
|
||||
|
|
39
Dockerfile
39
Dockerfile
|
@ -1,39 +0,0 @@
|
|||
# https://github.com/roadrunner-server/roadrunner/pkgs/container/roadrunner
|
||||
FROM ghcr.io/roadrunner-server/roadrunner:latest AS roadrunner
|
||||
FROM php:8.1-alpine
|
||||
|
||||
ENV PHP_TIMEZONE Europe/Moscow
|
||||
ENV APP_ENV=prod
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=roadrunner /usr/bin/rr /app/bin/rr
|
||||
COPY . /app/
|
||||
|
||||
RUN apk update && \
|
||||
apk add autoconf build-base icu libpq postgresql-dev && \
|
||||
docker-php-ext-configure intl && \
|
||||
docker-php-ext-configure pdo_pgsql && \
|
||||
docker-php-ext-configure sockets && \
|
||||
docker-php-ext-install -j$(nproc) intl && \
|
||||
docker-php-ext-install -j$(nproc) pdo_pgsql && \
|
||||
docker-php-ext-install -j$(nproc) sockets && \
|
||||
pecl install igbinary-3.2.7 && \
|
||||
pecl install redis-5.3.7 && \
|
||||
docker-php-ext-enable igbinary && \
|
||||
docker-php-ext-enable intl && \
|
||||
docker-php-ext-enable pdo_pgsql && \
|
||||
docker-php-ext-enable redis && \
|
||||
apk del autoconf build-base postgresql-dev && \
|
||||
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
|
||||
echo "date.timezone = $PHP_TIMEZONE" > $PHP_INI_DIR/conf.d/timezone.ini && \
|
||||
mkdir -p /usr/local/bin && \
|
||||
wget -O /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar && \
|
||||
chmod +x /usr/local/bin/composer && \
|
||||
ls -la /app && ls -la /app/bin && \
|
||||
chmod +x /app/bin/console && \
|
||||
/usr/local/bin/composer install --no-dev --no-progress --no-interaction --optimize-autoloader
|
||||
|
||||
VOLUME /var/log
|
||||
|
||||
CMD ["/app/bin/rr", "serve"]
|
21
README.md
21
README.md
|
@ -91,24 +91,3 @@ php bin/console user:add <your_username> <your_email> [your_password] [--invites
|
|||
# see --help for more info
|
||||
php bin/console invite:add <username> <number-of-invites>
|
||||
```
|
||||
|
||||
## Enabling dev mode
|
||||
|
||||
```shell
|
||||
echo 'APP_ENV=dev > .env.local'
|
||||
```
|
||||
|
||||
## Running in [RoadRunner](https://roadrunner.dev)
|
||||
|
||||
```shell
|
||||
# First time only:
|
||||
./vendor/bin/rr get --location bin/
|
||||
|
||||
# Running the server:
|
||||
./bin/rr serve
|
||||
|
||||
# Running the server in dev mode (watching enabled)
|
||||
bin/rr serve -c .rr.dev.yaml
|
||||
```
|
||||
|
||||
Read more [here](https://github.com/baldinof/roadrunner-bundle) and [here](https://github.com/roadrunner-server/roadrunner).
|
||||
|
|
|
@ -3,8 +3,7 @@ baldinof_road_runner:
|
|||
# See https://github.com/baldinof/roadrunner-bundle#kernel-reboots
|
||||
kernel_reboot:
|
||||
# if you want to use a fresh container on each request, use the `always` strategy
|
||||
#strategy: on_exception
|
||||
strategy: always
|
||||
strategy: on_exception
|
||||
# Exceptions you KNOW that do not put your app in an errored state
|
||||
allowed_exceptions:
|
||||
- Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
|
||||
|
|
|
@ -2,19 +2,16 @@ version: '3.7'
|
|||
|
||||
services:
|
||||
magnetico-web:
|
||||
image: skobkin/magnetico-web
|
||||
image: skobkin/magnetico-web-fpm
|
||||
build:
|
||||
context: .
|
||||
container_name: magnetico-web
|
||||
hostname: magnetico-web
|
||||
extra_hosts:
|
||||
- 'host.docker.internal:host-gateway'
|
||||
context: ./docker
|
||||
container_name: magnetico-web-fpm
|
||||
network_mode: host
|
||||
ports:
|
||||
- "127.0.0.1:${EXT_HTTP_PORT:-8080}:8080/tcp"
|
||||
- "127.0.0.1:${PHP_FPM_PORT:-9000}:9000/tcp"
|
||||
restart: unless-stopped
|
||||
user: "$UID"
|
||||
volumes:
|
||||
- "${LOG_PATH:-./var/log}:/app/var/log"
|
||||
- "${APP_LOCAL_PATH}:${APP_LOCAL_PATH}"
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
|
|
11
docker/Dockerfile
Normal file
11
docker/Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM php:7.4-fpm-alpine
|
||||
|
||||
ENV PHP_TIMEZONE Europe/Moscow
|
||||
|
||||
RUN apk update && \
|
||||
apk add postgresql-dev libpq && \
|
||||
docker-php-ext-configure pdo_pgsql && \
|
||||
docker-php-ext-install -j$(nproc) pdo_pgsql && \
|
||||
apk del postgresql-dev && \
|
||||
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
|
||||
echo "date.timezone = $PHP_TIMEZONE" > $PHP_INI_DIR/conf.d/timezone.ini
|
Loading…
Reference in a new issue