Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Stage 1 - build environment
FROM node:22-alpine AS build

RUN apk add --no-cache python3 make g++ git

# Create app directory
WORKDIR /usr/src/app

# Swtich to node user
#RUN chown node:node ./
#USER node

COPY .npmrc ./
COPY package*.json ./

# Install app dependencies
RUN npm ci

# Copy all required files
COPY . .

# Build the application
RUN npm run build:web

# Stage 2 - the production environment
FROM nginx:stable-alpine

# Copy artifacts and nignx.conf
COPY --from=build /usr/src/app/dist/browser /usr/share/nginx/html
COPY --from=build /usr/src/app/docker/nginx.conf /etc/nginx/conf.d/default.conf

CMD sed -i "s#http://localhost:3333#$BACKEND_URL#g" /usr/share/nginx/html/main.js && nginx -g 'daemon off;'
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
services:
backend:
image: 4gray/iptvnator-backend:latest
ports:
- "7333:3000"
environment:
- CLIENT_URL=http://localhost:4333
# this one should match with the address and port in frontend CLIENT_URL env

frontend:
build :
context: .
ports:
- "4333:80"
environment:
- BACKEND_URL=http://localhost:7333
# this one should match with the address of the backend service

2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
# this one should match with the address and port in frontend CLIENT_URL env

frontend:
image: 4gray/iptvnator:latest
image: .
ports:
- "4333:80"
environment:
Expand Down
11 changes: 11 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}

include /etc/nginx/extra-conf.d/*.conf;
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({
},
use: {
...devices['Desktop Chrome'],
baseURL: 'http://localhost:4200',
baseURL: 'http://0.0.0.0:4200',
headless: false,
screenshot: 'only-on-failure',
testIdAttribute: 'data-test-id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
playsinline
preload="none"
data-setup='{"liveui": true, "muted": false}'
type='video/x-matroska; codecs="theora, vorbis"'
></video>