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
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
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
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
COPY nginx/nginx.conf /etc/nginx/nginx.conf
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 /twitch-logs/dist /twitch-logs/twitch-logs/assets
RUN addgroup -g 9999 lilia

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

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

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

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@ -2,8 +2,8 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Comments</title>
<base href="/comments/">
<title>Twitch Logs</title>
<base href="/twitch-logs/">
<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">

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

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

Loading…
Cancel
Save