🌎
- https://www.linkedin.com/in/tejedaenrique
- @quiquetejeda
- https://www.enriquetejeda.com
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
function handler(event) { | |
var request = event.request; | |
// Example: | |
// Input: /app1/assets/test.jpg | |
// Output: /assets/test.jpg | |
request.uri = request.uri.replace(/^\/[^/]*\//, "/"); | |
// Check whether the URI is missing a file name. | |
if (request.uri.endsWith('/')) { |
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
FROM node:16 AS BUILDER | |
WORKDIR /app | |
COPY . . | |
RUN npm install --prod | |
RUN npm run build | |
FROM node:16-slim | |
ENV TZ=America/Cancun | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
WORKDIR /app |
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
version: '2' | |
services: | |
mongodb: | |
image: mongo:latest | |
container_name: mongodb | |
hostname: mongodb | |
ports: | |
- 27017:27017 | |
mongoclient: |
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
version: '3' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- "./nginx.tmpl:/app/nginx.tmpl" |
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
version: '2.2' | |
services: | |
elasticsearch-master-tls: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1 | |
container_name: elasticsearch-master-tls | |
environment: | |
- node.name=elasticsearch-master-tls | |
- cluster.name=elasticsearch-cluster-server | |
- cluster.initial_master_nodes=elasticsearch-master-tls | |
- bootstrap.memory_lock=true |
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
version : '3' | |
services: | |
mysql: # Up the database | |
image: mariadb:5.5 | |
container_name: mysql | |
environment: | |
MYSQL_USER: user | |
MYSQL_PASSWORD: user | |
MYSQL_ROOT_PASSWORD: root |