Fixed prod api url
This commit is contained in:
parent
a86890da2b
commit
85ea87201d
@ -26,5 +26,5 @@ APP_SECRET=71bf50bfb778d456b3a376ff60d5dcd8
|
||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/postgres?serverVersion=16&charset=utf8"
|
||||
DATABASE_URL="postgresql://postgres:postgres@calendi-postgres:5432/postgres?serverVersion=16&charset=utf8"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Infrastructure\DataFixtures;
|
||||
|
||||
use App\Domain\Model\PersistedEvent;
|
||||
use App\Domain\Model\Persisted\PersistedEvent;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Infrastructure\DataFixtures;
|
||||
|
||||
use App\Domain\Model\PersistedUser;
|
||||
use App\Domain\Model\Persisted\PersistedUser;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
|
||||
@ -16,13 +16,12 @@ services:
|
||||
- proxy
|
||||
|
||||
postgres:
|
||||
hostname: calendi-postgres
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./var/postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
|
||||
@ -17,6 +17,7 @@ services:
|
||||
- proxy
|
||||
|
||||
postgres:
|
||||
hostname: calendi-postgres
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
|
||||
@ -64,6 +64,8 @@ FROM builder AS prod
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY --chmod=755 docker/entrypoint.prod.sh /entrypoint.prod.sh
|
||||
|
||||
COPY . .
|
||||
COPY docker/nginx/default.conf /etc/nginx/sites-enabled/default
|
||||
|
||||
@ -71,4 +73,4 @@ RUN cd backend && composer install
|
||||
RUN cd frontend && npm install && npm run build
|
||||
|
||||
# Set entrypoint
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
ENTRYPOINT ["/entrypoint.prod.sh"]
|
||||
|
||||
13
docker/entrypoint.prod.sh
Normal file
13
docker/entrypoint.prod.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Start PHP-FPM service
|
||||
service php8.4-fpm start
|
||||
|
||||
# Change to frontend directory and start npm in background
|
||||
cd /var/www/html/frontend && export REACT_APP_API_URL=https://calendi.strolap.com && npm run start &
|
||||
|
||||
cd /var/www/html/backend && composer rebuild-db
|
||||
|
||||
# Start Nginx in foreground to keep container running
|
||||
exec nginx -g 'daemon off;'
|
||||
Loading…
x
Reference in New Issue
Block a user