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.0' | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
environment: | |
- AWS_DEFAULT_REGION=us-east-1 | |
- EDGE_PORT=4566 | |
- SERVICES=sqs | |
ports: |
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
{ | |
"name": "docker-hello-world", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js", | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", |
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 express = require('express') | |
const app = express() | |
const port = process.env.PORT || 3030; | |
app.get('/', (req, res) => res.send('Hello World! Onexlab')) | |
app.listen(port, (err) => { | |
if (err) { | |
console.log('Error::', err); |
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 base image node | |
FROM node:16 | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# Copying all the files from your file system to container file system | |
COPY package.json . |
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.0' | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
environment: | |
- AWS_DEFAULT_REGION=ap-southeast-1 | |
- EDGE_PORT=4566 | |
- SERVICES=dynamodb |
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.0' | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
environment: | |
- AWS_DEFAULT_REGION=ap-southeast-1 | |
- EDGE_PORT=4566 | |
- SERVICES=dynamodb |
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.0' | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
environment: | |
- AWS_DEFAULT_REGION=ap-southeast-1 | |
- EDGE_PORT=4566 | |
- SERVICES=dynamodb |
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
aws --endpoint-url=http://localhost:4566 dynamodb put-item \ | |
--table-name Music \ | |
--item \ | |
'{"Artist": {"S": "No One You Know"}, "SongTitle": {"S": "Call Me Today"}, "AlbumTitle": {"S": "Somewhat Famous"}, "Awards": {"N": "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
aws dynamodb --endpoint-url=http://localhost:4566 create-table \ | |
--table-name Music \ | |
--attribute-definitions \ | |
AttributeName=Artist,AttributeType=S \ | |
AttributeName=SongTitle,AttributeType=S \ | |
--key-schema \ | |
AttributeName=Artist,KeyType=HASH \ | |
AttributeName=SongTitle,KeyType=RANGE \ | |
--provisioned-throughput \ | |
ReadCapacityUnits=10,WriteCapacityUnits=5 |
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
Hello |