UPDATED README

This commit is contained in:
Jeroen De Meerleer 2022-11-08 17:12:15 +01:00
parent 24350a515b
commit b96433b005
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 76 additions and 2 deletions

View File

@ -5,7 +5,12 @@ Webcron management is an easy-to-use interface to manage cronjob running on a pu
# How to use the container
## Docker-compose
To deploy webcron management using a docker container I have created multiple options.
* 1 Container running daemon and webui at once (Easier)
* 2 Containers running daemon and webui in separate containers (More in accordance to docker philisophy)
## Option 1: 1 Container (Easier)
1. Create your .env file in the root of the compose instance. You can copy the [.env from this repository](https://git.jeroened.be/webcron/docker/src/branch/main/.env) and adapt to your config.
Alternatively you can can assign the environment vars in the directly in the compose file. It's up to you what is easier for you.
@ -23,4 +28,27 @@ Webcron management is an easy-to-use interface to manage cronjob running on a pu
docker compose exec app php bin/console webcron:user add
````
5. Webcron management is available on http://localhost/
5. Webcron management is available on http://localhost/
## Option 1: 2 Containers (Recommended)
1. Create your .env file in the root of the compose instance. You can copy the [.env from this repository](https://git.jeroened.be/webcron/docker/src/branch/main/.env) and adapt to your config.
Alternatively you can can assign the environment vars in the directly in the compose file. It's up to you what is easier for you.
2. Create your docker-compose file. You can copy the example config from [this repository](https://git.jeroened.be/webcron/docker/src/branch/main/docker-compose.separate.yml).
3. Start the container
```` bash
docker compose up -d
````
4. Create the first user
```` bash
docker compose exec daemon php bin/console webcron:user add
````
5. Webcron management is available on http://localhost/

View File

@ -0,0 +1,46 @@
version: '3.3'
services:
app:
image: jeroened/webcron:dev-webui
restart: always
env_file: .env
networks:
- webcron
depends_on:
- db
volumes:
- webcron_cache:/var/www/webcron/var/cache
daemon:
image: jeroened/webcron:dev-daemon
restart: always
env_file: .env
networks:
- webcron
depends_on:
- db
volumes:
- webcron_cache:/var/www/webcron/var/cache
db:
image: mariadb
hostname: webcrondb
restart: always
networks:
- webcron
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_USER=webcron
- MYSQL_PASSWORD=makemesecretplease
- MYSQL_DATABASE=webcron
volumes:
- webcron_db:/var/lib/mysql
networks:
webcron:
driver: bridge
volumes:
webcron_db:
webcron_cache: