feat(docker): prod, fix misc
This commit is contained in:
parent
0136998304
commit
4b12f63f2c
3 changed files with 31 additions and 16 deletions
17
Dockerfile
17
Dockerfile
|
@ -416,17 +416,22 @@ USER $sintonia_user
|
|||
|
||||
COPY ./docker/sintonia-webapp/php/php-ini-production /usr/local/etc/php/php.ini
|
||||
RUN cron && \
|
||||
git clone https://git.congegni.net/sintonia_webapp && \
|
||||
git clone --branch dev --single-branch https://git.congegni.net/sintonia_webapp && \
|
||||
cd sintonia_webapp && \
|
||||
/home/$sintonia_user/composer install --no-progress --no-interaction --no-autoloader && \
|
||||
/home/$sintonia_user/composer --no-cache dump-autoload --no-interaction && \
|
||||
php artisan migrate && \
|
||||
php artisan ziggy:generate && \
|
||||
php artisan key:generate && \
|
||||
mv ziggy.js resources/utils/ziggy.js && \
|
||||
npx vite build && \
|
||||
cp -r dist/build/* /var/www/html/ && \
|
||||
php artisan db:seed && \
|
||||
php artisan schedule:run >> /dev/null 2>&1 && \
|
||||
set -eux && \
|
||||
npm i && \
|
||||
php-fpm -D && \
|
||||
npm run build && \
|
||||
rm -rf /var/www/sintonia_webapp/node_modules /var/www/sintonia_webapp/.npm /var/www/sintonia_webapp/.composer /var/www/sintonia_webapp/.git && \
|
||||
rm -rf /home/$sintonia_user/node* /home/$sintonia_user/composer && \
|
||||
php-fpm
|
||||
sleep infinity
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
24
README.md
24
README.md
|
@ -18,11 +18,9 @@ This will be complemented by a new web application (hereafter referred to as "Si
|
|||
|
||||
This application will replicate the functions of the previous one while integrating new features, providing a more intuitive and simple user experience thanks to a new graphic design agreed upon.
|
||||
|
||||
## Build and run the containers
|
||||
## Build and run the dev containers
|
||||
|
||||
Currently only the dev version of the project is being developed, the branch to be used is main.
|
||||
|
||||
Ensure docker is installed and its service is up and running
|
||||
Ensure docker is installed, and its service is up and running
|
||||
|
||||
One can quickly test docker by running:
|
||||
```
|
||||
|
@ -33,7 +31,7 @@ Clone this repo using the command git clone and the url of this repo.
|
|||
|
||||
This repo contains a git submodule sintonia_webapp, it refers to this [repo](https://git.congegni.net/Congegni/sintonia_webapp).
|
||||
|
||||
Right now the submodule is not set up properly.
|
||||
Right now the submodule is not properly set up.
|
||||
So open a terminal in the root of this project, sintonia, and run this command:
|
||||
```
|
||||
git clone ssh://gitea@git.congegni.net:4022/Congegni/sintonia_webapp.git && cd sintonia_webapp && git checkout dev && cp .env.dev .env && cd ..
|
||||
|
@ -41,7 +39,7 @@ So open a terminal in the root of this project, sintonia, and run this command:
|
|||
|
||||
The folder sintonia_webapp now it's synced with the dev branch (the currently active branch).
|
||||
|
||||
Return to the sintonia project folder, run this commands:
|
||||
Return to the sintonia project folder, run these commands:
|
||||
|
||||
```
|
||||
# Clean and build
|
||||
|
@ -60,7 +58,7 @@ Run the following command:
|
|||
docker compose -f docker-compose.yml -f docker-compose.override.yml build && docker compose up -d && docker container restart sintonia-webapp-dev
|
||||
```
|
||||
|
||||
This commands builds the docker containers in dev mode, then it will attempt to start them up.
|
||||
This command builds the docker containers in dev mode, then it will attempt to start them up.
|
||||
|
||||
The sintonia web app is reachable on the port indicated in the env var SINTONIA_LARAVEL_PORT, by default the port is 9876.
|
||||
|
||||
|
@ -68,6 +66,12 @@ So proceed to open a browser, connect to http://127.0.0.1:9876 (if no config or
|
|||
|
||||
Usually the user created by default is login: admin password: admin
|
||||
|
||||
## Prod containers
|
||||
|
||||
The prod container for Sintonia is under development, it may be unstable
|
||||
|
||||
First of all
|
||||
|
||||
## HW usage
|
||||
The stats below refer to the containers without any load and some test data
|
||||
|
||||
|
@ -101,6 +105,12 @@ The stats below refer to the containers without any load and some test data
|
|||
### Images size
|
||||
4460.7MB
|
||||
|
||||
### Reverse proxy configuration
|
||||
|
||||
A reverse proxy may be set used to relay all the requests to the internal nginx server.
|
||||
|
||||
A sample nginx file can be found at /docker/nginx-host.conf
|
||||
|
||||
## Support
|
||||
|
||||
Coming soon
|
||||
|
|
|
@ -29,7 +29,7 @@ services:
|
|||
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
||||
- libretime_playout:/app
|
||||
environment:
|
||||
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
||||
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:9876
|
||||
|
||||
liquidsoap:
|
||||
image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest}
|
||||
|
@ -46,7 +46,7 @@ services:
|
|||
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
||||
- libretime_playout:/app
|
||||
environment:
|
||||
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
||||
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:9876
|
||||
|
||||
analyzer:
|
||||
image: ghcr.io/libretime/libretime-analyzer:${LIBRETIME_VERSION:-latest}
|
||||
|
@ -71,7 +71,7 @@ services:
|
|||
volumes:
|
||||
- ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro
|
||||
environment:
|
||||
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080
|
||||
LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:9876
|
||||
|
||||
api:
|
||||
image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-latest}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue