Browse Source

chore: configura o moodle para ser executado localmente

moodle_local
TalesRG 4 months ago
parent
commit
a081cce299
  1. 2
      config.php
  2. 23
      docker-compose.yml
  3. 10
      moodle-config.php

2
config.php

@ -62,7 +62,7 @@ $CFG->dboptions = array(
// (please note mysql is always using socket
// if dbhost is 'localhost' - if you need
// local port connection use '127.0.0.1')
//'dbport' => getenv('DB_PORT_3306_TCP_PORT'), // the TCP port number to use when connecting
'dbport' => 5433, // the TCP port number to use when connecting
// to the server. keep empty string for the
// default port
);

23
docker-compose.yml

@ -1,38 +1,21 @@
version: '3.3'
services:
moodle_database:
image: postgres:11-bullseye
ports:
- "5433:5432"
environment:
- POSTGRES_USER=moodle
- POSTGRES_PASSWORD=moodle
- PGDATA=/var/lib/postgresql/data
volumes:
- /home/danielbarros/3.7/data/db11:/var/lib/postgresql/data
moodle:
build: .
ports:
- "8000:80"
volumes:
- moodledata:/var/moodledata
- moodledata:/var/www/html/moodledata
environment:
- MOODLE_URL=http://saberesdev.interlegis.leg.br:8000
- MOODLE_DB_HOST=moodle_database
- MOODLE_URL=http://localhost:8000
- MOODLE_DB_HOST=172.31.17.35
- MOODLE_DB_NAME=moodle
- MOODLE_DB_USER=moodle
- MOODLE_DB_PASS=moodle
- MOODLE_DATA=/var/www/html/moodledata
- OSTICKET_API_KEY=B154D35D63E7A4ADAE8BA8282C6490CD
- OSTICKET_API_URL=http://10.1.2.242/osticket/upload/api/http.php/tickets.json
depends_on:
- moodle_database
networks:
saberes-net:
external: true
volumes:
moodledata:

10
moodle-config.php

@ -45,10 +45,10 @@ $CFG->urlTicketAPIKey = getenv('OSTICKET_API_KEY');
$CFG->dbtype = 'pgsql'; // 'pgsql', 'mariadb', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dbhost = getenv('MOODLE_DB_HOST'); // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = getenv('MOODLE_DB_NAME'); // database name, eg moodle
$CFG->dbuser = getenv('MOODLE_DB_USER'); // your database username
$CFG->dbpass = getenv('MOODLE_DB_PASS'); // your database password
$CFG->dbhost = '172.31.17.35 ' // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'moodle' // database name, eg moodle
$CFG->dbuser = 'moodle' // your database username
$CFG->dbpass = 'moodle' // your database password
$CFG->prefix = 'mdl_'; // prefix to use for all table names
$CFG->dboptions = array(
'dbpersist' => false, // should persistent database connections be
@ -61,7 +61,7 @@ $CFG->dboptions = array(
// (please note mysql is always using socket
// if dbhost is 'localhost' - if you need
// local port connection use '127.0.0.1')
//'dbport' => getenv('DB_PORT_3306_TCP_PORT'), // the TCP port number to use when connecting
'dbport' => 5433, // the TCP port number to use when connecting
// to the server. keep empty string for the
// default port
);

Loading…
Cancel
Save