Skip to content

Instantly share code, notes, and snippets.

@musghost
Last active October 4, 2017 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save musghost/1827f62985d82a7792b8f1054319c4c6 to your computer and use it in GitHub Desktop.
Save musghost/1827f62985d82a7792b8f1054319c4c6 to your computer and use it in GitHub Desktop.
version: '2'
services:
rails:
image: dockermd/frails:rm
hostname: "FichasAPIRails"
container_name: "FichasAPIRails2"
ports:
- "3000:3000"
- "8808:8808"
working_dir: /usr/src/app
links:
- postgresql
postgresql:
image: dockermd/fpostgres
hostname: "FichasAPIPostgres"
container_name: "FichasAPIPostgres2"
environment:
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "fichas"
POSTGRES_DB: "fichas_test"
node:
image: dockermd/paths
ports:
- "9000:9000"
front:
image: dockermd/fichaweb:win
ports:
- "80:80"
  1. Descargar nginx y nssm.cc http://nginx.org/en/download.html https://nssm.cc/
  2. Crear carpeta de servicios en c:/servicios
  3. Meter nginx y nssm a servicios
  4. ir a C:/servicios/nssm/win64 desde terminal
  5. ejecutar: nssm install nginx, va a preguntar por permisos de admin y le decimos que sí
  6. en donde dice set path, poner C:/servicios/nginx/nginx.exe y startup directory C:/servicios/nginx/
  7. en el tab de I/O en Input slow poner "start nginx"
  8. Dar click en install service
  9. Ir servicios del sistema, buscar nginx y darle iniciar.
  10. Meter configuración de nginx, c:/servicios/nginx/conf/nginx.conf
    location / {
        proxy_pass http://192.168.99.100:80;
        proxy_connect_timeout 20s;
    }
    add_header Cache-Control no-cache;
  1. Cambiar plantilla de error 500 por custom message (poner
  2. Cambiar hosts por 127.0.0.1 colegioamadonervo.potencia
docker-machine start default
FOR /f "tokens=*" %%i IN ('docker-machine env --shell cmd default') DO %%i
cd C:\Users\Potencia1\fichas
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment