jueves, 10 de marzo de 2022

Levantar un servidor wildfly mediante docker

Dockerfile

# Base image

FROM jboss/wildfly:11.0.0.Final
 
# Create user admin with password admin3
RUN /opt/jboss/wildfly/bin/add-user.sh admin admin3 --silent

# Create module postgres
RUN mkdir -p /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main/

# JBoss ports
EXPOSE 8080 9990 8009 9797
 
# Run
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "-c", "standalone.xml", "--debug", "9797"]

-------------------------------

docker-compse.yml

 version: '3.5'
services:
   wildfly:      
      ports:
         - "8080:8080"
         - "9990:9990" 
         - "8009:8009"
         - "9797:9797"
      image: emontenegro/wildfly:latest
      container_name: wildfly
      environment: 
       - JAVA_OPTS=-server -Xms256m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  
      volumes:
      - ./configuration:/opt/jboss/wildfly/standalone/configuration
      - ./module/postgresql/main:/opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main/
      networks:
      - proxynet
networks:
  proxynet:
    name: em-net

Levantar un servidor de KONGA mediante docker

 version: '3.5'

services:
  konga-prepare:
    image: pantsel/konga:latest
    container_name: konga-prepare
    command: "-c prepare -a postgres -u postgresql://postgres:postgres@postgresdb:5432/konga"
    restart: on-failure
    networks:
      - proxynet

  konga:
    image: pantsel/konga:latest
    container_name: konga
    restart: always
    volumes:
      - ./kongadata:/app/kongadata    
    environment:
      - "DB_ADAPTER=postgres"
      - "DB_HOST=postgresdb"
      - "DB_USER=postgres"
      - "DB_PASSWORD=postgres"
      - "DB_PORT:5432"
      - "TOKEN_SECRET=km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb"
      - "DB_DATABASE=konga"
      - "DB_PG_SCHEMA=public"
      - "NODE_ENV=production"
    depends_on:
      - konga-prepare    
    ports:
      - "1337:1337"
    networks:
      - proxynet

networks:
  proxynet:
    name: em-net


Levantar un servidor de Kong mediante docker

 version: '3.5'

services:
  kong-migration:
    image: kong:latest
    command: "kong migrations bootstrap"
    container_name: kong-migration
    networks:
      - proxynet
    restart: on-failure
    environment:
      - "KONG_DATABASE=postgres" 
      - "KONG_PG_HOST=postgresdb"
      - "KONG_PG_USER=postgres"
      - "KONG_PG_PASSWORD=postgres"    

  kong:    
    image: kong:latest    
    restart: always
    container_name: kong-gateway
    environment:
        - "KONG_DATABASE=postgres" 
        - "KONG_PG_HOST=postgresdb"
        - "KONG_PG_USER=postgres"
        - "KONG_PG_PASSWORD=postgres" 
        - "KONG_PROXY_ACCESS_LOG=/dev/stdout" 
        - "KONG_ADMIN_ACCESS_LOG=/dev/stdout" 
        - "KONG_PROXY_ERROR_LOG=/dev/stderr" 
        - "KONG_ADMIN_ERROR_LOG=/dev/stderr" 
        - "KONG_ADMIN_LISTEN=0.0.0.0:8001" 
        - "KONG_ADMIN_GUI_URL=http://localhost:8002"
    depends_on:
      - kong-migration

    ports:
      - "8000:8000"
      #- "8443:8443"
      - "8001:8001"
      #- "8444:8444" 
      - "8002:8002" 
      #- "8445:8445" 
      #- "8003:8003" 
      #- "8004:8004"  
    networks:
      - proxynet
networks:
  proxynet:
    name: em-net

Levantar un servidor de postgres mediante docker

 version: '3.5'
services:
  db:
    image: 'postgres:11-alpine'
    restart: always
    volumes:
      - './postgres_data:/var/lib/postgresql/data'
    container_name: postgresdb
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    ports:
      - '5432:5432' 
    networks:
      - proxynet
networks:
  proxynet:
    name: em-net


viernes, 6 de abril de 2018

Install PHP 5.6 (or 5.5) in Ubuntu 16.04 LTS (Xenial Xerus)

sudo add-apt-repository ppa:ondrej/php

sudo apt-get update

sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
Switch PHP version ( Apache ):
  • from php5.6 to php7.0:
    sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart
  • from php7.0 to php5.6:
    sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

jueves, 20 de julio de 2017

Error: Cannot read property ‘replace’ of undefined [Android]

var num = target.split('(API level ')[1].replace(')', '');
I replaced it with a regex search and extraction:
var num = target.match(/\d+/)[0];

sábado, 11 de julio de 2015

Como Deshabilitar el Spell Checker in Netbeans



For NetBeans to really understand that you don't want spellchecker, do the following: 

Go toTools -> Plugins -> Installed tab -> select the spellchecker plugin -> press Deactivate -> restart NetBeans