https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css
<link rel="https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css">
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
I took one of my current projects and basically ran your Dockerfile...and got a 1.1 GB docker save tar file. It compresses well, but a 345 MB gzipped tar file still isn't what you're after. "Use an Alpine base image" is somewhat helpful, but not a silver bullet; switching it to be FROM node:8-alpine reduces it to a 514 MB uncompressed tar file. | |
If you don't already have a .dockerignore file, then your entire existing node_modules directory will get copied into the image. (In particular, the COPY . . step will copy your entire working tree in, overwriting the installed modules from the previous step.) It can just contain the single line | |
node_modules | |
The Alpine base image, plus not emitting a duplicate node_modules tree, gets me down to 382 MB uncompressed. | |
Notice in your example that your npm install step includes all of the development dependencies as well as the runtime dependencies. That can be a significant cost. If your application doesn't need any precompilation (it is plain JavaScript that Node can r |
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
pipeline { | |
stages { | |
stage("install") { | |
agent { | |
docker { | |
reuseNode true | |
image 'node:6.10' | |
} | |
} | |
steps { |
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
# Add environment variables to AWS Parameter Store on the same path prefix for the same project | |
# To get the environment variables for a project, get the variables by path | |
# Convert it to a .env file format | |
# env1=abc | |
# env2=def | |
# separated by the newline character | |
# and write to a .env file | |
myService=/myservice_name/stage_name | |
# Get variables from SSM and chop off the service name from the variable names (/myservice_name/stage_name/PORT to PORT) and write to a JSON file |
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 logging | |
from sys import stdout | |
# Define logger | |
logger = logging.getLogger('mylogger') | |
logger.setLevel(logging.DEBUG) # set logger level | |
logFormatter = logging.Formatter\ | |
("%(name)-12s %(asctime)s %(levelname)-8s %(filename)s:%(funcName)s %(message)s") | |
consoleHandler = logging.StreamHandler(stdout) #set streamhandler to stdout |
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
ARG PYTHON_VERSION=3.7 | |
ARG ALPINE_VERSION=3.7 | |
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} | |
WORKDIR /app | |
COPY supervisord.conf /etc/ | |
COPY . /app | |
ENV LC_ALL C.UTF-8 |