browsertrix/frontend/Dockerfile
Ilya Kreymer 82ffc0dfbc
Local Deployment Work: Support running locally + test cluster on CI (#396)
* k8s local deployment work:
- make it easier to deploy w/o ingress by setting 'local_service_port' (suggested port 30870)
- if using local minio, ensure file endpoints set to /data/ and /data/ proxies correctly to local bucket
- if not using minio, ensure file endpoints point to correct access / endpoint url.
- setup should work with docker desktop, minikube, microk8s and k3s!
- nginx chart: bump nginx memory limit to 20Mi
- nginx image: 00-default-override-resolver-config -> 00-browsertrix-nginx-init for clarity
- nginx image: use default nginx.conf, pin to nginx 1.23.2
- mongo: readd readiness probe, bump connect wait timeout (needed for ci)
- config: set superadmin username to 'admin'
- config schema: set 'name' as required 
- add sample chart values overrides:
- chart values: local-config.yaml for running locally with 'local_service_port'
- chart values: add microk8s-hosted.yaml for configuring a hosted microk8s setup
- chart values: add microk8s-ci.yaml for ci tests
- ci: remove docker swarm tests
- ci: add microk8s integration tests: launching cluster, logging in, running a crawl of example.com, downloading/checking WACZ
- bump to 1.1.0-beta.2
2022-12-02 19:58:34 -08:00

45 lines
938 B
Docker

# central place to configure the production replayweb.page loading prefix
ARG RWP_BASE_URL=https://cdn.jsdelivr.net/npm/replaywebpage/
FROM docker.io/library/node:16 as build
ARG GIT_COMMIT_HASH
ARG GIT_BRANCH_NAME
ARG VERSION
ENV GIT_COMMIT_HASH=${GIT_COMMIT_HASH} \
GIT_BRANCH_NAME=${GIT_BRANCH_NAME} \
VERSION=${VERSION}
WORKDIR /app
COPY yarn.lock package.json ./
RUN yarn --frozen-lockfile
COPY lit-localize.json \
postcss.config.js \
tailwind.config.js \
tsconfig.json \
webpack.config.js \
webpack.prod.js \
index.d.ts \
./
COPY src ./src/
RUN yarn build
FROM docker.io/library/nginx:1.23.2
ARG RWP_BASE_URL
ENV RWP_BASE_URL=${RWP_BASE_URL}
COPY --from=build /app/dist /usr/share/nginx/html
#COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./frontend.conf.template /etc/nginx/templates/
COPY ./minio.conf /etc/nginx/includes/
ADD ./00-browsertrix-nginx-init.sh ./docker-entrypoint.d/