updates around README, .env, Dockerfile
This commit is contained in:
+3
-1
@@ -1,7 +1,9 @@
|
|||||||
SERVER_NAME=trial
|
SERVER_NAME=trial
|
||||||
POSTGRES_USER=trail_user
|
POSTGRES_USER=trial_user
|
||||||
POSTGRES_PASSWORD=trial_password
|
POSTGRES_PASSWORD=trial_password
|
||||||
POSTGRES_DB=trial_db
|
POSTGRES_DB=trial_db
|
||||||
PGPORT=5433
|
PGPORT=5433
|
||||||
TLS_MODE=tls_selfsigned
|
TLS_MODE=tls_selfsigned
|
||||||
TLS_AUTO_EMAIL=jhon.doe@example.com
|
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.
|
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 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).
|
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_ENV="%env(APP_ENV)%"
|
||||||
APP_SECRET=eb09be4fcc136ed9174c7136f13b98e4
|
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"
|
||||||
|
|
||||||
|
|||||||
+3
-10
@@ -53,16 +53,9 @@
|
|||||||
"symfony/polyfill-php81": "*"
|
"symfony/polyfill-php81": "*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"auto-scripts": {
|
"auto-scripts": {},
|
||||||
"cache:clear": "symfony-cmd",
|
"post-install-cmd": [],
|
||||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
"post-update-cmd": []
|
||||||
},
|
|
||||||
"post-install-cmd": [
|
|
||||||
"@auto-scripts"
|
|
||||||
],
|
|
||||||
"post-update-cmd": [
|
|
||||||
"@auto-scripts"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"symfony/symfony": "*"
|
"symfony/symfony": "*"
|
||||||
|
|||||||
+13
-2
@@ -1,12 +1,23 @@
|
|||||||
FROM php:8.2-fpm
|
FROM php:8.2-fpm
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
unzip \
|
unzip \
|
||||||
libonig-dev \
|
libonig-dev \
|
||||||
libxml2-dev && \
|
libxml2-dev \
|
||||||
|
curl gpg && \
|
||||||
docker-php-ext-install -j$(nproc) pdo pdo_pgsql zip mbstring pcntl
|
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');" \
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
|
&& 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
|
||||||
Reference in New Issue
Block a user