This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(docker): setup docker env for testing
- Loading branch information
1 parent
c581856
commit 5a6c34d
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Localstack | ||
|
||
HOSTNAME=localstack-s3 | ||
SERVICES=s3:5000 | ||
DEFAULT_REGION=us-east-1 | ||
|
||
S3_KEY=no_need | ||
S3_SECRET=no_need | ||
S3_ENDPOINT=http://localstack-s3:5000 | ||
S3_BUCKET=testbucket | ||
S3_REGION=us-east-1 | ||
|
||
SPACES_KEY=no_need | ||
SPACES_SECRET=no_need | ||
SPACES_ENDPOINT=http://localstack-s3:5000 | ||
SPACES_BUCKET=testbucket | ||
SPACES_REGION=us-east-1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM node:current-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json ./ | ||
COPY yarn.lock ./ | ||
|
||
RUN apk add --no-cache \ | ||
python \ | ||
make \ | ||
gcc \ | ||
g++ \ | ||
&& yarn | ||
|
||
RUN yarn | ||
|
||
COPY . . | ||
CMD ["yarn", "run", "test"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '3' | ||
services: | ||
flydrive: | ||
container_name: flydrive | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
depends_on: | ||
- localstack-s3 | ||
env_file: | ||
- ./.env.testing | ||
volumes: | ||
- .:/app | ||
- /app/node_modules | ||
command: tail -f /dev/null | ||
|
||
# Based on http://bluesock.org/~willkg/blog/dev/using_localstack_for_s3.html | ||
# More examples at https://medium.com/@andyalky/developing-aws-apps-locally-with-localstack-7f3d64663ce4 | ||
localstack-s3: | ||
container_name: localstack-s3 | ||
image: localstack/localstack | ||
env_file: | ||
- ./.env.testing | ||
ports: | ||
- '5000:5000' | ||
- '8080:8080' | ||
restart: on-failure |