Skip to content
Open
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
node_modules
var
dist
dist

# Ignore all IDEA files
*.iml
.idea
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM alpine:3.18.2

# Volume for output
VOLUME /output

# Install dependencies
RUN apk add --no-cache nodejs yarn zsh npm

# Copy script and source
COPY . /usr/src/apn-competency-helper
COPY build-assets/run.sh /usr/src/run.sh
RUN chmod +x /usr/src/run.sh

# Build
WORKDIR /usr/src/apn-competency-helper
RUN yarn install
RUN npm run-script build

# Run
CMD ["/usr/src/run.sh"]
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ And finally, the helper zips everything in the `var` directory.

## Usage

### Direct Execution on Local Machine

//Install dependencies
$ yarn install

Expand All @@ -62,7 +64,25 @@ Select the partner path

![Worksheet name](./doc/3.png)

Look in the `var` directory!
After execution of the script, the file structure is created in the `var` directory.


### Execution Via Docker

If you like to run this script within a contained environment, you can build a Docker image with

$ docker image rm -f aws-helper/apn-competency-helper && docker build -t aws-helper/apn-competency-helper .

By specifying an output directory as a volume, you can run the competency helper like this:

$ docker run -it --name aws-competency-helper -v output:/output aws-helper/apn-competency-helper

After execution of the script, the file structure is created in the `output` directory.

To generate the file structure repeatedly, you can use the following command:

$ docker container start -i aws-competency-helper


## Troubleshoot

Expand Down
7 changes: 7 additions & 0 deletions build-assets/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/zsh

cd apn-competency-helper

node ./dist/index.js

mv var/* /output