Skip to content

Commit

Permalink
Merge 2aa47b3 into 9a09f61
Browse files Browse the repository at this point in the history
  • Loading branch information
eltonplima committed Jul 11, 2018
2 parents 9a09f61 + 2aa47b3 commit 31c83d8
Show file tree
Hide file tree
Showing 7 changed files with 15,300 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ yarn-error.log*
/test/unit/coverage/

# Editor directories and files
.vs
.idea
.vscode
*.suo
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ yarn run lint
# run all tests
yarn test
```

## Build docker image

```
cd docker && ./build.sh
```
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM nginx

COPY . .

COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY dist /usr/share/nginx/html
8 changes: 8 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

cd ..
npm install && \
npm run build && \
cd - && \
docker-compose build && \
docker-compose push
16 changes: 16 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.3'

services:
bothub_frontend:
image: ${BOTHUB_FRONTEND_IMAGE_NAME:-ilha/bothub_frontend}:${BOTHUB_FRNTEND_TAG:-latest}
build:
context: ..
dockerfile: docker/Dockerfile
ports:
- 80:80
environment:
- API_BASE_URL=${API_BASE_URL:-/api}
- MAILCHIMP_LOGIN=${MAILCHIMP_LOGIN:-}
- MAILCHIMP_DATACENTER=${MAILCHIMP_DATACENTER:-}
- MAILCHIMP_USER_ID=${MAILCHIMP_USER_ID:-}
- MAILCHIMP_LIST_ID=${MAILCHIMP_LIST_ID:-}
19 changes: 19 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error_log /dev/stdout info;

server {
listen 80 default_server;
listen [::]:80 default_server;

if ($http_x_forwarded_proto = 'http') {
return 301 https://$host$request_uri;
}

access_log /dev/stdout;

root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html =404;
}
}
Loading

0 comments on commit 31c83d8

Please sign in to comment.