+----------+ +----------+ +----------+ +----------+ | HAProxy0 | | HAProxy1 | | HAProxy2 | ... | HAProxyN | +----------+ +----------+ +----------+ +----------+ | | | | | -----------+-------------+----------------+ v +---------------+ | Swarm Manager | +---------------+ |
This file contains hidden or 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
| { | |
| "production": { | |
| "nginx:1.17-alpine": { | |
| "service": "<stack_name>_nginx" | |
| } | |
| } | |
| } |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func worker(id int, jobs <-chan int, results chan<- int, wg *sync.WaitGroup) { | |
| for j := range jobs { |
This file contains hidden or 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 { DOCUMENT } from '@angular/common'; | |
| import { | |
| AfterViewInit, | |
| Component, | |
| ElementRef, | |
| OnInit, | |
| Renderer2, | |
| ViewChild, | |
| Inject, | |
| } from '@angular/core'; |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| intChan := make(chan int, 10) | |
| intChan <- 1 |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" | |
| "net/http" | |
| "net/http/httptest" | |
| "os" |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "encoding/base64" | |
| "flag" | |
| "io" | |
| "log" | |
| "os" | |
| "strings" |
This file contains hidden or 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
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; |
This file contains hidden or 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 React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| import App from './App'; | |
| import registerServiceWorker from './registerServiceWorker'; | |
| import { AppContainer } from 'react-hot-loader'; | |
| if (module.hot) { | |
| module.hot.accept('./App', () => { | |
| render(require('./App').default); |
This file contains hidden or 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
| const assets = { | |
| scripts: [ | |
| { | |
| src: `${paths.publicUrl}static/js/bundle.js` | |
| } | |
| ], | |
| styles: [] | |
| }; | |
| if (process.env.NODE_ENV === 'production') { |