This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createBrowserHistory } from 'history'; | |
export default createBrowserHistory(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import authReducer, { AuthStateInterface } from '../components/auth/authReducer'; | |
// Interface inside my reducer file | |
// export interface AuthStateInterface { | |
// authenticated?: string | null; | |
// } | |
export interface IAppState { | |
//... Other state you need here | |
auth: AuthStateInterface; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { render as ReactRender } from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { Router, Route } from 'react-router-dom'; | |
import './scss/main.scss'; | |
import SignIn from './components/auth/signin/SignIn'; | |
import SignUp from './components/auth/signup/SignUp'; | |
import Event from './components/dashboard/event/Event'; | |
import AuthorizedRoute from './hoc/AuthorizedRouteHOC'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:11.4 as base | |
WORKDIR /app | |
# use changes to package.json to force Docker not to use the cache | |
# when we change our application's nodejs dependencies: | |
COPY package*.json /tmp/ | |
RUN cd /tmp && npm install --quiet | |
RUN cp -r /tmp/node_modules /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import http from 'http2'; | |
const app = express(); | |
app.get('/', () => { message: 'Hellow Docker and TypeScript' }); | |
http.createServer(app).listen('8080', () => { | |
console.log('Ready fox! I\'m listening') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
services: | |
app: | |
container_name: dockertsdev_app | |
command: npm run start:dev | |
build: . | |
volumes: | |
- .:/app | |
# Don't forget this part, it's really important |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: clean down build | |
build: | |
docker-compose build | |
build-nc: | |
docker-compose build --no-cache | |
start: | |
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// This attribute will hold all the compile option of TypeScript | |
"compilerOptions": { | |
// Where are located your source code | |
"rootDir": "src", | |
// Where you want to put our compiled code | |
"outDir": "build", | |
// Which ES library you want to include |
OlderNewer