docker-compose up -d <NAME>
docker-compose logs
Note: Just drop the -d
flag if you want to see the logs echoed to stdout.
If you disabled query logging, you can still log individual queries when needed.
await User.findOne({
logging: console.log, // log SQL statement to console
// ...
});
Debian/Ubuntu image already included a self-signed certificate.
docker run \
--rm \
-e POSTGRES_PASSWORD=password \
postgres:12 \
-c ssl=on \
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem \
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
const zlib = require('zlib');
const buf = Buffer.from('hello world', 'utf-8');
zlib.gzip(buf, (err, compressed) => {
if (err) {
console.error(err);
}
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q -a)
const today = new Date()
const tomorrow = new Date(today)
tomorrow.setDate(tomorrow.getDate() + 1)
// NOTE: If you also want to reset the time to "tomorrow at 00:00:00",
// you can do so by calling tomorrow.setHours(0,0,0,0).