Skip to content

Commit

Permalink
dockerized
Browse files Browse the repository at this point in the history
  • Loading branch information
andrealeo83 committed Jul 18, 2018
1 parent d853e79 commit e9f0b20
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
Binary file added .README.md.swp
Binary file not shown.
6 changes: 6 additions & 0 deletions Dockerfile
@@ -0,0 +1,6 @@
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf

WORKDIR /usr/share/nginx/html
COPY dist/ .
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -80,3 +80,7 @@ Run : `aws s3 sync . s3://tiledesk-widget`
Or With a different AWS Profile:

Run : `aws --profile f21 s3 sync . s3://tiledesk-widget`

# Docker
docker image build -t tiledesk-web-widget .
docker run -p 4200:80 tiledesk-web-widget
25 changes: 25 additions & 0 deletions nginx.conf
@@ -0,0 +1,25 @@
worker_processes 1;

events {
worker_connections 1024;
}

http {
server {
listen 80;
server_name localhost;

root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;

gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;

location / {
try_files $uri $uri/ /index.html;
}
}
}
3 changes: 2 additions & 1 deletion src/app/core/auth.service.ts
Expand Up @@ -10,7 +10,7 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable()
export class AuthService {
// public user: Observable<firebase.User>;
public user: firebase.User;
public user: any;
public token: string;
obsLoggedUser: BehaviorSubject<any>;

Expand All @@ -21,6 +21,7 @@ export class AuthService {
this.obsLoggedUser = new BehaviorSubject<any>(null);
}


getCurrentUser() {
const that = this;
firebase.auth().onAuthStateChanged(user => {
Expand Down

0 comments on commit e9f0b20

Please sign in to comment.