updates around README, .env, Dockerfile

master
Denis Ranneft 2 years ago
parent 4700578b1a
commit fa5cfab7f5
Signed by: immortal
GPG Key ID: 2F3893C622654BDF

@ -1,7 +1,9 @@
SERVER_NAME=trial
POSTGRES_USER=trail_user
POSTGRES_USER=trial_user
POSTGRES_PASSWORD=trial_password
POSTGRES_DB=trial_db
PGPORT=5433
TLS_MODE=tls_selfsigned
TLS_AUTO_EMAIL=jhon.doe@example.com
APP_ENV=prod
APP_SECRET=eb09be4fcc136ed9174c7136f13b98e4

@ -13,11 +13,13 @@ your desire please make sure you changed them in both places.
To access the test you will need to write the server name in your `/etc/hosts` file. E.g.
```
~ #> echo "trial 127.0.0.1" >> /etc/hosts
~ #> echo "127.0.0.1 trial" >> /etc/hosts
```
Run `docker compose up -d`
Run `docker compose exec --workdir=/var/www/trial php /usr/local/bin/composer install`
Run `docker compose exec --workdir=/var/www/trial php /usr/local/bin/php ./bin/console cache:clear`
Run `docker compose exec --workdir=/var/www/trial php /usr/local/bin/php ./bin/console doctrine:migrations:migrate --no-interaction`
Run `docker compose exec --workdir=/var/www/trial php /usr/bin/yarn encore prod`
To access the test then just simply visit `https://trial:8443` (you need to agree with self-signed cert).

@ -1,5 +1,5 @@
APP_ENV=dev
APP_SECRET=eb09be4fcc136ed9174c7136f13b98e4
APP_ENV="%env(APP_ENV)%"
APP_SECRET="%env(APP_SECRET)%"
DATABASE_URL="postgresql://trial_user:trial_password@postgres:5433/trial_db?serverVersion=16&charset=utf8"
DATABASE_URL="postgresql://%env(POSTGRES_USER)%:%env(POSTGRES_PASSWORD)%@postgres:%env(PGPORT)%/%env(POSTGRES_DB)%?serverVersion=16&charset=utf8"

@ -53,16 +53,9 @@
"symfony/polyfill-php81": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
"auto-scripts": {},
"post-install-cmd": [],
"post-update-cmd": []
},
"conflict": {
"symfony/symfony": "*"

@ -1,12 +1,23 @@
FROM php:8.2-fpm
RUN apt-get update && apt-get install -y \
libpq-dev \
libzip-dev \
unzip \
libonig-dev \
libxml2-dev && \
libxml2-dev \
curl gpg && \
docker-php-ext-install -j$(nproc) pdo pdo_pgsql zip mbstring pcntl
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash ;\
apt-get update; \
apt-get install -y nodejs
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');"
&& php -r "unlink('composer-setup.php');"
WORKDIR /var/www/trial
COPY ./app/composer.json ./app/composer.lock ./app/package.json ./app/yarn.lock ./app/symfony.lock ./
RUN composer install && npm install -g yarn -y && yarn install
Loading…
Cancel
Save