Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose all Microsoft SQL Server license prices #730

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ FROM ubuntu:20.04

ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG AWS_SESSION_TOKEN
ARG DEBIAN_FRONTEND=noninteractive

LABEL org.opencontainers.image.authors="Sebastian Sasu <[email protected]>, Cristian Magherusan-Stanciu <[email protected]>, Brooke McKim <[email protected]>"
LABEL org.opencontainers.image.authors="Sebastian Sasu <[email protected]>, Cristian Magherusan-Stanciu <[email protected]>, Brooke McKim <[email protected]>"

RUN apt-get update > /dev/null
RUN apt-get install -y python3 pip locales libxml2-dev libxslt-dev nodejs npm > /dev/null
Expand All @@ -14,11 +15,16 @@ RUN locale-gen "en_US.UTF-8"

WORKDIR /opt/app

# install dependencies into a dedicated Docker layer, to speed up subsequent builds a bit
COPY requirements.txt .
RUN pip3 install -r requirements.txt

COPY . .

RUN pip3 install -r requirements.txt
RUN invoke build

EXPOSE 8080

ENV HTTP_HOST=0.0.0.0

CMD ["invoke", "serve"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ docker build -t ec2instances.info .

```bash
docker run -d --name some-container -p 8080:8080 ec2instances.info

4. Open [localhost:8080](http://localhost:8080) in your browser to see it in action.

## Docker Compose

Here's how you can build and run docker image using Docker Compose (tested with Docker Compose v2):

```bash
docker-compose up
```

4. Open [localhost:8080](http://localhost:8080) in your browser to see it in action.
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'
services:
ec2instances.info:
build:
context: .
args:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
ports:
- '8080:8080'
4 changes: 2 additions & 2 deletions in/rds.html.mako
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
</th>
% endfor

% for platform, code in {'MySQL': '2', 'SQL Server Standard': '12', 'Aurora Postgres & MySQL': '21', 'Aurora I/O Optimized': '211', 'MariaDB': '18', 'Oracle Enterprise': '5'}.items():
% for platform, code in {'MySQL': '2', 'SQL Server Express': '10','SQL Server Web': '11','SQL Server Standard': '12','SQL Server Enterprise': '15', 'Aurora Postgres & MySQL': '21', 'Aurora I/O Optimized': '211', 'MariaDB': '18', 'Oracle Enterprise': '5'}.items():
<th class="cost-ondemand cost-ondemand-${code}">${platform} On Demand Cost</th>
% if code != '211':
<th class="cost-reserved cost-reserved-${code}">
Expand Down Expand Up @@ -257,7 +257,7 @@
</td>
% endfor

% for platform, code in {'MySQL': '2', 'SQL Server Standard': '12', 'Aurora Postgres & MySQL': '21', 'Aurora I/O Optimized': '211', 'MariaDB': '18', 'Oracle Enterprise': '5'}.items():
% for platform, code in {'MySQL': '2', 'SQL Server Express': '10', 'SQL Server Web': '11', 'SQL Server Standard': '12','SQL Server Enterprise': '15', 'Aurora Postgres & MySQL': '21', 'Aurora I/O Optimized': '211', 'MariaDB': '18', 'Oracle Enterprise': '5'}.items():
<td class="cost-ondemand cost-ondemand-${code}" data-platform='${code}' data-vcpu='${inst['vcpu']}' data-memory='${inst['memory']}'>
% if inst['pricing'].get('us-east-1', {}).get(code, {}).get('ondemand', 'N/A') != "N/A":
<span sort="${inst['pricing']['us-east-1'][code]['ondemand']}">
Expand Down
Loading