Skip to content
Snippets Groups Projects
Commit a3b49847 authored by gabriellisboaconegero's avatar gabriellisboaconegero
Browse files

chore: Criando dockerfile

parent c5bb11da
Branches
No related tags found
No related merge requests found
FROM monetdb/monetdb:latest
# Nome do banco para criar
ENV MDB_CREATE_DBS=treinamento
# Senha do user monetdb
ENV MDB_DB_ADMIN_PASS=12345
RUN mkdir open_data
COPY ./open_data/ ./open_data
EXPOSE 50000
......@@ -22,7 +22,7 @@ along with HOTMapper. If not, see <https://www.gnu.org/licenses/>.
import logging
def db_env_file_path(file_name):
return file_name.replace('glc22', 'monetdb')
return "/open_data/"+file_name.split('/')[-1]
# SQL dialect used by sqlalchemy.
DATABASE_DIALECT = 'monetdb'
......@@ -34,6 +34,7 @@ DATABASE_USER_PASSWORD = '12345'
# Host to connect to. Bulk inserts won't work remotely unless you can specify an
# absolute path in the server
DATABASE_HOST = 'localhost'
DATABASE_PORT = '50001'
# Database to connect to
DATABASE = 'treinamento'
......@@ -42,8 +43,9 @@ DATABASE = 'treinamento'
YEAR_COLUMN = 'ano_censo'
# URI structure. Standards to login:password model, but can be changed as needed.
DATABASE_URI = '{}://{}:{}@{}/{}'.format(DATABASE_DIALECT, DATABASE_USER,
DATABASE_USER_PASSWORD, DATABASE_HOST, DATABASE)
DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format(DATABASE_DIALECT, DATABASE_USER,
DATABASE_USER_PASSWORD, DATABASE_HOST,
DATABASE_PORT, DATABASE)
# Folder and file where backup is created - absolute path
BACKUP_FOLDER = '/home/banco/dumps/monetdb/'
BACKUP_FILE = 'backupdadoseducacionais'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment