Skip to content

Instantly share code, notes, and snippets.

View Rolilink's full-sized avatar

Rolando Perez Rolilink

View GitHub Profile
@Rolilink
Rolilink / docker-compose.yml
Created April 27, 2020 01:40
adding routers
version: '3'
services:
cats-mongo:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: mongo
MONGO_INITDB_DATABASE: cats
volumes:
- cats_mongodb_data:/data/db
@Rolilink
Rolilink / traefik.toml
Created April 27, 2020 01:12
adding entrypoints
[api]
dashboard = true # enables the dashboard
insecure = true # enables access to traefik api for some reason needed to access dashboard not intended for production environments
[providers.docker]
[entryPoints]
[entryPoints.web]
address = ":80"
@Rolilink
Rolilink / docker-compose.yml
Created April 27, 2020 00:36
Adding the traefik image
traefik:
build:
context: ./traefik
dockerfile: .docker/Dockerfile
ports:
- "8080:8080" # expose the admin UI
- "80:80" # expose the web entrypoint
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
@Rolilink
Rolilink / traefik.toml
Last active April 27, 2020 01:03
adding docker integration
[api]
dashboard = true # enables the dashboard
insecure = true # enables access to traefik api for some reason needed to access dashboard not intended for production environments
[providers.docker]
@Rolilink
Rolilink / Dockerfile
Created April 27, 2020 00:23
traefik dockerfile
FROM traefik
# exposing port 80 for web communication
EXPOSE 80
# exposing port 8080 for dashboard access
EXPOSE 8080
# this will let us load the static initial configuration
COPY .docker/skel /
FROM node:erbium
WORKDIR /www
ENV RUNTIME dev
EXPOSE 3000
# Install app dependencies
COPY package.json ./
@Rolilink
Rolilink / Dockerfile
Created April 26, 2020 22:14
Node services Dockerfile
FROM node:erbium
WORKDIR /www
ENV RUNTIME dev
EXPOSE 3000
# Install app dependencies
COPY package.json ./
@Rolilink
Rolilink / docker-compose.yml
Last active April 26, 2020 21:57
Initial Architecture
version: '3'
services:
cats-mongo:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: mongo
MONGO_INITDB_DATABASE: cats
volumes:
- cats_mongodb_data:/data/db
@Rolilink
Rolilink / LoginForm.jsx
Created October 4, 2017 20:37
LoginForm
import React from 'react';
import PropTypes from 'prop-types';
export const getDefaultState = (
{
username = '',
password = '',
shouldRememberUser = false,
error = null,
} = {}
import React from 'react';
import PropTypes from 'prop-types';
import ListGroup from 'react-bootstrap/lib/ListGroup';
export default class List extends React.Component {
static propTypes = {
renderListItem: PropTypes.func.isRequired,
items: PropTypes.arrayOf(PropTypes.any).isRequired,
className: PropTypes.string,
}