Skip to content

Instantly share code, notes, and snippets.

View EightArmCode's full-sized avatar
💭
Endlessly acquiring new skills...

Kat Chilton EightArmCode

💭
Endlessly acquiring new skills...
View GitHub Profile
@EightArmCode
EightArmCode / Dockerfile
Last active July 22, 2023 10:12
Dockerized multi-stage NextJs build in standalone mode, to be served by nginx-proxy
/**
* This was pieced together from multiple sources on the web,
* but none of them had solved directory structure for standalone mode at the time.
*
* The final structure used here allows the following location block in nginx:
*
* proxy_pass http://localhost:3000/
*/
# Dockerfile
@EightArmCode
EightArmCode / docker-compose.elastic-kibana.yml
Created February 19, 2021 09:51
Docker compose elastic + kibana
services:
elasticsearch:
image: elasticsearch:7.10.1
ports:
- 9200:9200
environment:
- discovery.type=single-node
kibana:
@EightArmCode
EightArmCode / fakePromiseAll
Created August 27, 2018 14:29
fakePromiseAll catches rejected promises to complete all promises and collect errors
function fakePromiseAll(arr) {
return Promise.all(arr.map(item => {
return item.then(
result => {
return result;
},
error => {
return error;
}
);