Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for hosting website via nginx docker #153

Merged
Merged
Show file tree
Hide file tree
Changes from 11 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
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ COPY package.json ./package.json
COPY yarn.lock ./yarn.lock
OwenTruong marked this conversation as resolved.
Show resolved Hide resolved
# copy `dist` if it exists already
COPY dis[t]/web ./dist/
OwenTruong marked this conversation as resolved.
Show resolved Hide resolved
COPY node_module[s] ./node_modules
# git is needed for jinter
RUN apk add git
# don't rebuild if you don't have to
RUN if [ ! -d 'node_modules' ]; then yarn ci; fi
RUN if [ ! -d 'dist/web' ]; then yarn ci; fi

## Build Stage ##
FROM node:18-alpine AS build
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ yarn pack:web

### Commands for the PWA Docker Image
```bash

# 💨 Creates and runs the image locally. Add `--platform=linux/arm64` to docker build for ARM64 devices including Apple Silicon
docker build -t freetubecordova . # Warning, might take 10 minutes.
docker build -t freetubecordova . # Warning, might take a while on Apple Silicon
docker run --name ftcordova -d -p 8080:80 freetubecordova

# 🏃 Runs the image from Docker Hub.
Expand Down