Skip to content

Commit

Permalink
Moving package.json to parent
Browse files Browse the repository at this point in the history
  • Loading branch information
kopiro committed Oct 15, 2018
1 parent f48b754 commit d8f0590
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 69 deletions.
File renamed without changes.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
node_modules
config.json
.env
.awscredentials
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/app/node_modules
/config.json
/.env
/.awscredentials
node_modules
config.json
.env
.awscredentials
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ RUN apt-get -y install gifsicle
RUN apt-get -y install webp

RUN sed -i "s/jessie main/jessie main contrib non-free/" /etc/apt/sources.list && \
echo "deb http://http.debian.net/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list && \
apt-get update && apt-get install -y ffmpeg
echo "deb http://http.debian.net/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list && \
apt-get update && apt-get install -y ffmpeg

RUN npm i -g svgo

RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip \
python3-setuptools \
groff \
less \
&& pip3 install --upgrade pip \
&& apt-get clean && \
pip3 install awscli

COPY ./app/package.json /app
apt-get install -y \
python3 \
python3-pip \
python3-setuptools \
groff \
less \
&& pip3 install --upgrade pip \
&& apt-get clean && \
pip3 install awscli

COPY package.json /app
RUN npm i

COPY ./app /app
COPY . /app
RUN npm link

ENTRYPOINT ["/usr/local/bin/tommy"]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ I suggest you to use with Docker to avoid installing all dependencies in your ho

```sh
docker run \
-v "$(pwd)/volumes/src":/src \
-v "$(pwd)/volumes/dst":/dst \
-v "$(pwd)/test/src":/src \
-v "$(pwd)/test/dst":/dst \
-v "$(pwd)/config.json:/root/config.json" \
kopiro/tommy \
--src /src \
Expand All @@ -100,8 +100,8 @@ kopiro/tommy \

Explanation of mounts:

- `-v "$(pwd)/volumes/src":/src` mount the source directory (where your assets are located) into container `/src`
- `-v "$(pwd)/volumes/dst":/dst` mount the destination directory (where your assets will be generated) into container `/dst`
- `-v "$(pwd)/test/src":/src` mount the source directory (where your assets are located) into container `/src`
- `-v "$(pwd)/test/dst":/dst` mount the destination directory (where your assets will be generated) into container `/dst`
- `-v "$(pwd)/config.json:/root/config.json"` mount your (optional) configuration JSON file into container `/root/config.json`

## How to: run in MacOS
Expand All @@ -115,14 +115,14 @@ npm -g i tommy
Then run as a binary:

```sh
tommy --src ./volumes/src --dst ./volumes/dst
tommy --src ./test/src --dst ./test/dst
```

## How: build locally Docker image

Download the repository, then run `./test-docker.sh`.

It will build the Docker image locally and test with volumes present in current repository.
It will build the Docker image locally and test with test present in current repository.

## Configure AWS credentials

Expand Down
40 changes: 0 additions & 40 deletions app/config.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ DOCKER_IMAGE="kopiro/tommy"
docker build -t $DOCKER_IMAGE . && \

docker run -t \
-v "$(pwd)/volumes/src":"/src" \
-v "$(pwd)/volumes/dst":"/dst" \
-v "$(pwd)/test/src":"/src" \
-v "$(pwd)/test/dst":"/dst" \
-v "$(pwd)/config.json":"/root/config.json" \
-v "$(pwd)/.awscredentials":"/root/.aws/credentials" \
kopiro/tommy \
Expand Down
4 changes: 2 additions & 2 deletions test-macos.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
tommy \
--src ./volumes/src \
--dst ./volumes/dst \
--src ./test/src \
--dst ./test/dst \
--config ./config.json
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d8f0590

Please sign in to comment.