mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Switching back to master branch, repair docker-compose, documentation
This commit is contained in:
parent
b4106d4f2a
commit
8fa66c1c93
4 changed files with 99 additions and 35 deletions
8
.github/workflows/docker-image.yml
vendored
8
.github/workflows/docker-image.yml
vendored
|
@ -3,12 +3,12 @@ name: Docker Image CI
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "master"
|
||||
pull_request:
|
||||
branches:
|
||||
- "main"
|
||||
schedule:
|
||||
- cron: '35 2 * * 1'
|
||||
- "master"
|
||||
# schedule:
|
||||
# - cron: '35 2 * * 1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
@ -9,15 +9,14 @@ LABEL maintainer="TRW <trw@acoby.de>" \
|
|||
org.label-schema.vendor="WWBN"
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VERSION_ENCODER 3.7
|
||||
|
||||
ENV DB_MYSQL_HOST db
|
||||
ENV DB_MYSQL_HOST database
|
||||
ENV DB_MYSQL_PORT 3306
|
||||
ENV DB_MYSQL_NAME avideo
|
||||
ENV DB_MYSQL_USER avideo
|
||||
ENV DB_MYSQL_PASSWORD avideo
|
||||
|
||||
ENV VERSION_ENCODER 3.7
|
||||
|
||||
ENV SERVER_NAME avideo.localhost
|
||||
ENV CREATE_TLS_CERTIFICATE yes
|
||||
ENV TLS_CERTIFICATE_FILE /etc/apache2/ssl/localhost.crt
|
||||
|
|
44
README.md
44
README.md
|
@ -152,12 +152,54 @@ In order for you to be able to run AVideo Platform, there are certain tools that
|
|||
- MySQL 5.0+
|
||||
- Apache web server 2.x (with mod_rewrite enabled)
|
||||
|
||||
## Docker local development
|
||||
## Docker
|
||||
|
||||
We've created a docker compose environment for easy development and production.
|
||||
|
||||
### Development
|
||||
|
||||
Either just build the current branch by cloning the repository and run
|
||||
|
||||
```bash
|
||||
doker build -t avideo .
|
||||
```
|
||||
|
||||
And run the image. It contains an Apache2 webserver exposing ports 80 and 443.
|
||||
We recommend using HTTPS on port 443 and ignore the HTTP port 80. The container
|
||||
will create a self-signed certificate on startup. There are some environment
|
||||
variables, that could be used to configure the environment
|
||||
|
||||
- `DB_MYSQL_HOST` - defines the database host name - default is `database`
|
||||
- `DB_MYSQL_PORT` - defines the database port - default is `3306`
|
||||
- `DB_MYSQL_NAME` - defines the database name - default is `avideo`
|
||||
- `DB_MYSQL_USER` - defines the database user - default is `avideo`
|
||||
- `DB_MYSQL_PASSWORD` - defines the database password - default is `avideo`
|
||||
- `SERVER_NAME` - defines the virtualhost name for Apache - default is ` avideo.localhost`
|
||||
- `ENABLE_PHPMYADMIN` - defines, if PHPMyAdmin should be exposed - default is `yes`
|
||||
- `CREATE_TLS_CERTIFICATE` - defines, if the container should generate a self-signed certificate - default is `yes`
|
||||
- `TLS_CERTIFICATE_FILE` - defines the location of the TLS certificate - default is `/etc/apache2/ssl/localhost.crt`
|
||||
- `TLS_CERTIFICATE_KEY` - defines the location of the TLS private key - default is `/etc/apache2/ssl/localhost.key`
|
||||
|
||||
If you don't want to rebuild the image during development, mount the git repository to
|
||||
the path `/var/www/html/AVideo`. Then it using your local copy.
|
||||
|
||||
### Compose
|
||||
|
||||
We've also a simple docker compose environment to define the complete necessary
|
||||
environment. You can just use and customize the local `docker-compose.yml` file.
|
||||
|
||||
Beside the above defined docker image that can be build locally, the environment
|
||||
contains a MariaDB database and a PhpMyAdmin to have an easy look into the
|
||||
database content.
|
||||
|
||||
```bash
|
||||
docker-compose up --build -d
|
||||
```
|
||||
|
||||
In production you should remove the phpmyadmin image by setting `ENABLE_PHPMYADMIN=no`.
|
||||
|
||||
Also we're working on a prebuild image.
|
||||
|
||||
# Roadmap
|
||||
|
||||
## Version 8.9
|
||||
|
|
|
@ -1,37 +1,60 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
web:
|
||||
image: ubuntu/apache2
|
||||
restart: unless-stopped
|
||||
# Change ports when in use
|
||||
ports:
|
||||
- '8383:80'
|
||||
- '881:3306'
|
||||
- '8443:443'
|
||||
expose:
|
||||
- 8383
|
||||
- 881
|
||||
- 8443
|
||||
build: .
|
||||
environment:
|
||||
DB_MYSQL_HOST: "db"
|
||||
DB_MYSQL_PORT: 3306
|
||||
DB_MYSQL_USER: "avideo"
|
||||
DB_MYSQL_PASSWORD: "root"
|
||||
DB_MYSQL_NAME: "avideo"
|
||||
volumes:
|
||||
- ./var/www/avideo:/var/www/avideo
|
||||
networks:
|
||||
- app_net
|
||||
db:
|
||||
image: mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
restart: "unless-stopped"
|
||||
ports:
|
||||
- 8306:3306
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
environment:
|
||||
DB_MYSQL_HOST: "database"
|
||||
DB_MYSQL_PORT: 3306
|
||||
DB_MYSQL_NAME: "avideo"
|
||||
DB_MYSQL_USER: "avideo"
|
||||
DB_MYSQL_PASSWORD: "avideo"
|
||||
SERVER_NAME: "localhost"
|
||||
CREATE_TLS_CERTIFICATE: "yes"
|
||||
TLS_CERTIFICATE_FILE: "/etc/apache2/ssl/localhost.crt"
|
||||
TLS_CERTIFICATE_KEY: "/etc/apache2/ssl/localhost.key"
|
||||
volumes:
|
||||
- "./var/www/avideo:/var/www/avideo"
|
||||
depends_on:
|
||||
- database
|
||||
- phpmyadmin
|
||||
networks:
|
||||
- app_net
|
||||
|
||||
phpmyadmin:
|
||||
image: "phpmyadmin/phpmyadmin"
|
||||
restart: "unless-stopped"
|
||||
environment:
|
||||
PMA_ABSOLUTE_URI: "https://localhost/phpmyadmin"
|
||||
PMA_HOST: "database"
|
||||
PMA_PORT: 3306
|
||||
PMA_CONTROLUSER: "avideo"
|
||||
PMA_CONTROLPASS: "avideo"
|
||||
PMA_PMADB: "avideo"
|
||||
HIDE_PHP_VERSION: "true"
|
||||
depends_on:
|
||||
- database
|
||||
networks:
|
||||
- app_net
|
||||
|
||||
database:
|
||||
image: "mariadb:latest"
|
||||
restart: "unless-stopped"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: yes
|
||||
MYSQL_INITDB_SKIP_TZINFO: 1
|
||||
MYSQL_DATABASE: "avideo"
|
||||
MYSQL_USER: "avideo"
|
||||
MYSQL_PASSWORD: "avideo"
|
||||
volumes:
|
||||
- ./.compose/db:/var/lib/mysql
|
||||
networks:
|
||||
- app_net
|
||||
|
||||
networks:
|
||||
app_net:
|
||||
driver: bridge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue