Rename comments to twitch-logs

master
Nikola Forró 6 years ago
parent b0f957c0fc
commit f72a9cc6de

@ -10,16 +10,6 @@ COPY apps/quotes .
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
WORKDIR /build-comments
COPY apps/comments/package.json apps/comments/package-lock.json ./
RUN npm install && mkdir /comments && cp -r node_modules/ /comments
WORKDIR /comments
COPY apps/comments .
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
WORKDIR /build-schedule WORKDIR /build-schedule
COPY apps/schedule/package.json apps/schedule/package-lock.json ./ COPY apps/schedule/package.json apps/schedule/package-lock.json ./
@ -30,13 +20,23 @@ COPY apps/schedule .
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
WORKDIR /build-twitch-logs
COPY apps/twitch-logs/package.json apps/twitch-logs/package-lock.json ./
RUN npm install && mkdir /twitch-logs && cp -r node_modules/ /twitch-logs
WORKDIR /twitch-logs
COPY apps/twitch-logs .
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
FROM nginx:alpine FROM nginx:alpine
COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /quotes/dist /quotes/quotes/assets COPY --from=builder /quotes/dist /quotes/quotes/assets
COPY --from=builder /comments/dist /comments/comments/assets
COPY --from=builder /schedule/dist /schedule/schedule/assets COPY --from=builder /schedule/dist /schedule/schedule/assets
COPY --from=builder /twitch-logs/dist /twitch-logs/twitch-logs/assets
RUN addgroup -g 9999 lilia RUN addgroup -g 9999 lilia

@ -1,7 +1,7 @@
{ {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": { "project": {
"name": "comments" "name": "twitch-logs"
}, },
"apps": [ "apps": [
{ {

@ -21,7 +21,7 @@ export class CommentsService {
filter = '', sortBy = 'recorded_at', sortOrder = 'desc', filter = '', sortBy = 'recorded_at', sortOrder = 'desc',
pageNumber = 0, pageSize = 20): Observable<any> { pageNumber = 0, pageSize = 20): Observable<any> {
return this.http.get('/comments/api/videos', { return this.http.get('/twitch-logs/api/videos', {
observe: 'response', observe: 'response',
params: new HttpParams() params: new HttpParams()
.set('filter', filter) .set('filter', filter)
@ -41,7 +41,7 @@ export class CommentsService {
filter = '', sortBy = 'offset', sortOrder = 'asc', filter = '', sortBy = 'offset', sortOrder = 'asc',
pageNumber = 0, pageSize = 20): Observable<any> { pageNumber = 0, pageSize = 20): Observable<any> {
return this.http.get('/comments/api/videos/' + videoID + '/comments', { return this.http.get('/twitch-logs/api/videos/' + videoID + '/comments', {
observe: 'response', observe: 'response',
params: new HttpParams() params: new HttpParams()
.set('filter', filter) .set('filter', filter)

@ -43,7 +43,7 @@ export class ImagesService {
} }
getEmotes(): Observable<any> { getEmotes(): Observable<any> {
return this.http.get('/comments/api/emotes').pipe( return this.http.get('/twitch-logs/api/emotes').pipe(
map((res: any[]) => { map((res: any[]) => {
return res.map((emote: any) => ({ return res.map((emote: any) => ({
id: emote.id, id: emote.id,

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@ -2,8 +2,8 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Comments</title> <title>Twitch Logs</title>
<base href="/comments/"> <base href="/twitch-logs/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" sizes="16x16 32x32 48x48"> <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" sizes="16x16 32x32 48x48">

@ -11,7 +11,7 @@ services:
- 127.0.0.1:8080:80 - 127.0.0.1:8080:80
depends_on: depends_on:
- quotes-api - quotes-api
- comments-api - twitch-logs-api
- cms - cms
# Quotes API service with /data/quotes mounted as database storage # Quotes API service with /data/quotes mounted as database storage
@ -27,16 +27,16 @@ services:
expose: expose:
- 5000 - 5000
# Twitch comments API service with /data/comments mounted as database storage # Twitch logs API service with /data/twitch-logs mounted as database storage
# TWITCH_CLIENT_ID, TWITCH_OAUTH_TOKEN and TWITCH_CHANNEL_ID are needed for # TWITCH_CLIENT_ID, TWITCH_OAUTH_TOKEN and TWITCH_CHANNEL_ID are needed for
# Twitch API access and synchronization # Twitch API access and synchronization
comments-api: twitch-logs-api:
build: build:
context: ./comments-api context: ./twitch-logs-api
volumes: volumes:
- /data/comments:/comments - /data/twitch-logs:/twitch-logs
environment: environment:
- SQLALCHEMY_DATABASE_URI=sqlite:////comments/comments.db - SQLALCHEMY_DATABASE_URI=sqlite:////twitch-logs/twitch-logs.db
- TWITCH_CLIENT_ID=__TWITCH_CLIENT_ID__ - TWITCH_CLIENT_ID=__TWITCH_CLIENT_ID__
- TWITCH_OAUTH_TOKEN=__TWITCH_OAUTH_TOKEN__ - TWITCH_OAUTH_TOKEN=__TWITCH_OAUTH_TOKEN__
- TWITCH_CHANNEL_ID=__TWITCH_CHANNEL_ID__ - TWITCH_CHANNEL_ID=__TWITCH_CHANNEL_ID__

@ -52,14 +52,14 @@ http {
root /quotes; root /quotes;
} }
location ^~ /comments/assets/ {
root /comments;
}
location ^~ /schedule/assets/ { location ^~ /schedule/assets/ {
root /schedule; root /schedule;
} }
location ^~ /twitch-logs/assets/ {
root /twitch-logs;
}
location ^~ /quotes/api/ { location ^~ /quotes/api/ {
rewrite ^/quotes/api(/.*)$ $1 break; rewrite ^/quotes/api(/.*)$ $1 break;
proxy_set_header Host $host; proxy_set_header Host $host;
@ -69,13 +69,13 @@ http {
proxy_pass http://quotes-api:5000/; proxy_pass http://quotes-api:5000/;
} }
location ^~ /comments/api/ { location ^~ /twitch-logs/api/ {
rewrite ^/comments/api(/.*)$ $1 break; rewrite ^/twitch-logs/api(/.*)$ $1 break;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1; proxy_http_version 1.1;
tcp_nodelay on; tcp_nodelay on;
proxy_pass http://comments-api:5000/; proxy_pass http://twitch-logs-api:5000/;
} }
location ~ /\.ht { location ~ /\.ht {

Loading…
Cancel
Save