Skip to content

Commit

Permalink
darkmode disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bgulla committed Feb 13, 2023
1 parent af8acf3 commit bdfb45e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 16 deletions.
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ EXPOSE 3000
# Start the app in debug mode so we can attach the debugger
CMD ["npm", "start"]

## Production ##################################################################
# Also define a production target which doesn't use devDeps
FROM base as production
WORKDIR /home/node/app
COPY --chown=node:node --from=development /home/node/app/node_modules /home/node/app/node_modules
# Build the Docusaurus app
RUN npm run build
# ## Production ##################################################################
# # Also define a production target which doesn't use devDeps
# FROM base as production
# WORKDIR /home/node/app
# COPY --chown=node:node --from=development /home/node/app/node_modules /home/node/app/node_modules
# # Build the Docusaurus app
# RUN npm run build

## Deploy ######################################################################
# Use a stable nginx image
FROM nginx:stable-alpine as deploy
WORKDIR /home/node/app
# Copy what we've installed/built from production
#COPY --chown=node:node --from=production /home/node/app/build /usr/share/nginx/html/
COPY --from=production /home/node/app/build /usr/share/nginx/html/
# ## Deploy ######################################################################
# # Use a stable nginx image
# FROM nginx:stable-alpine as deploy
# WORKDIR /home/node/app
# # Copy what we've installed/built from production
# #COPY --chown=node:node --from=production /home/node/app/build /usr/share/nginx/html/
# COPY --from=production /home/node/app/build /usr/share/nginx/html/
41 changes: 41 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Base ########################################################################
# Use a larger node image to do the build for native deps (e.g., gcc, python)
FROM node:lts as base

# Reduce npm log spam and colour during install within Docker
ENV NPM_CONFIG_LOGLEVEL=warn
ENV NPM_CONFIG_COLOR=false

# We'll run the app as the `node` user, so put it in their home directory
WORKDIR /home/node/app
# Copy the source code over
COPY --chown=node:node . /home/node/app/

## Development #################################################################
# Define a development target that installs devDeps and runs in dev mode
FROM base as development
WORKDIR /home/node/app
# Install (not ci) with dependencies, and for Linux vs. Linux Musl (which we use for -alpine)
RUN npm install
# Switch to the node user vs. root
USER root
# Expose port 3000
EXPOSE 3000
# Start the app in debug mode so we can attach the debugger
CMD ["npm", "start"]

# ## Production ##################################################################
# # Also define a production target which doesn't use devDeps
# FROM base as production
# WORKDIR /home/node/app
# COPY --chown=node:node --from=development /home/node/app/node_modules /home/node/app/node_modules
# # Build the Docusaurus app
# RUN npm run build

# ## Deploy ######################################################################
# # Use a stable nginx image
# FROM nginx:stable-alpine as deploy
# WORKDIR /home/node/app
# # Copy what we've installed/built from production
# #COPY --chown=node:node --from=production /home/node/app/build /usr/share/nginx/html/
# COPY --from=production /home/node/app/build /usr/share/nginx/html/
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const config = {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
defaultMode: 'light',
disableSwitch: true,
respectPrefersColorScheme: false,
},
navbar: {
Expand Down

0 comments on commit bdfb45e

Please sign in to comment.