feat: dockerize examples. react and nextjs working

This commit is contained in:
Felix Dubrownik
2022-09-22 12:18:40 +02:00
parent 4e1e0de5cd
commit 3cf422e579
25 changed files with 1556 additions and 3238 deletions

20
examples/vue/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# pull official base image
FROM node:16-alpine
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install app dependencies
COPY package.json ./
COPY package-lock.json ./
RUN npm install
RUN npm install react-scripts@3.4.1 -g --silent
# add app
COPY . ./
# start app
CMD ["npm", "start"]

View File

@ -18,4 +18,4 @@ In the `.env` file set up the correct environment variables:
### Run development server
Run `npm install` to install dependencies, then run `npm run start` for a development server. Navigate to `http://localhost:3000/`. The application will automatically reload if you change any of the source files.
Run `npm install` to install dependencies, then run `npm run start` for a development server. Navigate to `http://localhost:8888/`. The application will automatically reload if you change any of the source files.

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"name": "vue",
"scripts": {
"start": "vite --port 3000"
"start": "vite --port 8888"
},
"dependencies": {
"@teamhanko/hanko-elements": "^0.0.7-alpha",