Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Node modules
node_modules
16 changes: 16 additions & 0 deletions Dockerfile.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:20-alpine

WORKDIR /app

COPY package.json yarn.lock ./

RUN yarn install --frozen-lockfile

COPY . .

ENV PORT=5173
ENV HOST=0.0.0.0

EXPOSE 5173

CMD ["yarn", "run", "dev", "--host", "0.0.0.0"]
20 changes: 20 additions & 0 deletions Dockerfile.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:20-alpine

WORKDIR /app

COPY package.json yarn.lock ./

RUN yarn install --frozen-lockfile

RUN yarn global add serve

COPY . .

RUN yarn build

ENV PORT=5173
ENV HOST=0.0.0.0

EXPOSE 5173

CMD ["serve", "-s", "dist", "-l", "5173"]
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,43 @@ Start the server
yarn run dev
```

### Using Docker

You can run PhotoFlow using Docker in either development or production mode:

#### Development Mode

Build the development Docker image:

```bash
docker build -f Dockerfile.development -t photoflow:dev .
```

Run the development container:

```bash
docker run -p 5173:5173 photoflow:dev
```

This will start the development server with hot-reload enabled.

#### Production Mode

Build the production Docker image:

```bash
docker build -f Dockerfile.production -t photoflow:prod .
```

Run the production container:

```bash
docker run -p 5173:5173 photoflow:prod
```

This will serve the optimized production build using the serve package.

You can access the application at `http://localhost:5173` in both modes.

## Personalize Data Generation 🧬
Since this project uses Faker.js, you have control over the number of posts, stories, and comments rendered. To customize this data, navigate to the SampleGenerator class:
Expand Down
Loading