Update docker commands
This commit is contained in:
parent
e056ae53f7
commit
8a4ebf893e
32
README.md
32
README.md
@ -10,30 +10,34 @@ Minimum requirements: [Docker](https://www.docker.com/) & Git working.
|
|||||||
You can pull the image from [DockerHub](https://hub.docker.com/r/rosariosis/rosariosis) or:
|
You can pull the image from [DockerHub](https://hub.docker.com/r/rosariosis/rosariosis) or:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://gitlab.com/francoisjacquet/docker-rosariosis.git
|
git clone https://gitlab.com/francoisjacquet/docker-rosariosis.git
|
||||||
$ cd docker-rosariosis
|
cd docker-rosariosis
|
||||||
$ docker build -t rosariosis .
|
sudo docker build -t rosariosis .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
RosarioSIS uses a PostgreSQL database:
|
RosarioSIS uses a PostgreSQL database:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run --name rosariosisdb -d postgres
|
sudo docker run --name rosariosisdb -e "POSTGRES_PASSWORD=postgrespwd" -d postgres
|
||||||
$ docker run -e "ROSARIOSIS_ADMIN_EMAIL=admin@example.com" -e "PGHOST=rosariosisdb" -h `hostname -f` -d -p 80:80 --name rosariosis --link rosariosisdb:rosariosisdb rosariosis
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Setup database:
|
Create database:
|
||||||
```bash
|
```bash
|
||||||
$ docker exec -it rosariosisdb /bin/bash
|
sudo docker exec -it rosariosisdb bash
|
||||||
# psql -h localhost -p 5432 -U postgres
|
psql -h localhost -p 5432 -U postgres
|
||||||
postgres=# CREATE USER rosario WITH PASSWORD 'rosariopwd';
|
postgres=# CREATE USER rosario WITH PASSWORD 'rosariopwd';
|
||||||
postgres=# CREATE DATABASE rosariosis WITH ENCODING 'UTF8' OWNER rosario;
|
postgres=# CREATE DATABASE rosariosis WITH ENCODING 'UTF8' OWNER rosario;
|
||||||
postgres=# \q
|
postgres=# \q
|
||||||
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
Port 80 will be exposed, so you can visit `localhost/InstallDatabase.php` to get started. Default username and password: `admin`.
|
Run RosarioSIS and link the PostgreSQL container:
|
||||||
|
```bash
|
||||||
|
sudo docker run -e "ROSARIOSIS_ADMIN_EMAIL=admin@example.com" -e "PGHOST=rosariosisdb" -h `hostname -f` -d -p 80:80 --name rosariosis --link rosariosisdb:rosariosisdb rosariosis/rosariosis:master
|
||||||
|
```
|
||||||
|
|
||||||
|
Port 80 will be exposed, so you can visit http://localhost/InstallDatabase.php to get started. Default username and password: `admin`.
|
||||||
|
|
||||||
Note: a `docker-compose.yml` file is available.
|
Note: a `docker-compose.yml` file is available.
|
||||||
|
|
||||||
@ -69,6 +73,14 @@ This optional environment variable can be used to define the default school year
|
|||||||
|
|
||||||
This optional environment variable is for RosarioSIS to show another language.
|
This optional environment variable is for RosarioSIS to show another language.
|
||||||
|
|
||||||
|
Values are `fr_FR` for French and `es_ES` for Spanish.
|
||||||
|
|
||||||
|
You must also generate the `fr_FR.utf8` (for example) locale. To do so run these commands:
|
||||||
|
```bash
|
||||||
|
sudo docker exec -it rosariosis bash
|
||||||
|
dpkg-reconfigure locales
|
||||||
|
```
|
||||||
|
|
||||||
### ROSARIOSIS_VERSION
|
### ROSARIOSIS_VERSION
|
||||||
|
|
||||||
This optional environment variable is used to set the required version of RosarioSIS.
|
This optional environment variable is used to set the required version of RosarioSIS.
|
||||||
|
@ -4,12 +4,11 @@ version: '3.1'
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: sameersbn/postgresql
|
image: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: example
|
POSTGRES_USER: rosario
|
||||||
DB_USER: rosario
|
POSTGRES_PASSWORD: rosariopwd
|
||||||
DB_PASS: rosariopwd
|
POSTGRES_DB: rosariosis
|
||||||
DB_NAME: rosariosis
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user