Skip to content
Closed
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
Empty file modified .husky/commit-msg
100644 → 100755
Empty file.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
Binary file added backend/.Dockerfile.swp
Binary file not shown.
8 changes: 8 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
npm-debug.log
.git
.env
Dockerfile
docker-compose.yml
tests

10 changes: 10 additions & 0 deletions backend/.env.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PORT=8080
MONGODB_URI="mongodb://3.94.101.243/wanderlust"
REDIS_URL="redis://3.94.101.243:6379"
FRONTEND_URL=http://3.94.101.243:5173
ACCESS_COOKIE_MAXAGE=120000
ACCESS_TOKEN_EXPIRES_IN='120s'
REFRESH_COOKIE_MAXAGE=120000
REFRESH_TOKEN_EXPIRES_IN='120s'
JWT_SECRET=70dd8b38486eee723ce2505f6db06f1ee503fde5eb06fc04687191a0ed665f3f98776902d2c89f6b993b1c579a87fedaf584c693a106f7cbf16e8b4e67e9d6df
NODE_ENV=Development
8 changes: 4 additions & 4 deletions backend/.env.sample
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PORT=8080
MONGODB_URI="mongodb://127.0.0.1/wanderlust"
REDIS_URL="redis://127.0.0.1:6379"
FRONTEND_URL=http://localhost:5173
MONGODB_URI="mongodb://localhost/wanderlust"
REDIS_URL="redis://3.94.101.243:6379"
FRONTEND_URL=http://3.94.101.243:5173
ACCESS_COOKIE_MAXAGE=120000
ACCESS_TOKEN_EXPIRES_IN='120s'
REFRESH_COOKIE_MAXAGE=120000
REFRESH_TOKEN_EXPIRES_IN='120s'
JWT_SECRET=70dd8b38486eee723ce2505f6db06f1ee503fde5eb06fc04687191a0ed665f3f98776902d2c89f6b993b1c579a87fedaf584c693a106f7cbf16e8b4e67e9d6df
NODE_ENV=Development
NODE_ENV=Development
10 changes: 10 additions & 0 deletions backend/1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PORT=8080
MONGODB_URI="mongodb://3.94.101.243/wanderlust"
REDIS_URL="redis://3.94.101.243:6379"
FRONTEND_URL=http://3.94.101.243:5173
ACCESS_COOKIE_MAXAGE=120000
ACCESS_TOKEN_EXPIRES_IN='120s'
REFRESH_COOKIE_MAXAGE=120000
REFRESH_TOKEN_EXPIRES_IN='120s'
JWT_SECRET=70dd8b38486eee723ce2505f6db06f1ee503fde5eb06fc04687191a0ed665f3f98776902d2c89f6b993b1c579a87fedaf584c693a106f7cbf16e8b4e67e9d6df
NODE_ENV=Development
33 changes: 33 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#Stage 1: Build the application
FROM node:21-alpine AS build

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json first
COPY package*.json ./

# Install dependencies
RUN npm install --legacy-peer-deps

# Copy the rest of the application files
COPY . .

# Copy the environment file
COPY .env.sample .env

# Stage 2: Create a lightweight production image
FROM node:21-alpine AS production

# Set the working directory
WORKDIR /app

# Copy only the built application from the build stage
COPY --from=build /app ./

# Expose the application port
EXPOSE 8080

# Specify the command to run your application
CMD ["npm", "start"]

Binary file added backend/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
Binary file not shown.
18 changes: 18 additions & 0 deletions command_history.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
1 clear
2 hisrotyr
3 history
4 ls
5 cd wanderlust/
6 history
7 clea
8 clear
9 history
10 all commands
11 all command
12 cleaar
13 compgen -c
14 history
15 cat ~/.bash_history
16 tail -n 10 ~/.bash_history
17 history | grep "search_term"
18 history > command_history.txt
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "3.8"
services:
mongodb:
container_name: mongo
image: mongo:latest
volumes:
- ./backend/data:/data
ports:
- "27017:27017"

backend:
container_name: backend
build: ./backend
env_file:
- ./backend/.env.docker
ports:
- "8080:8080"
depends_on:
- mongodb

frontend:
container_name: frontend
build: ./frontend
env_file:
- ./frontend/.env.docker
ports:
- "5173:5173"

redis:
container_name: redis
restart: unless-stopped
image: redis:7.0.5-alpine
expose:
- 6379
depends_on:
- mongodb

volumes:
data:
2 changes: 1 addition & 1 deletion frontend/.env.sample
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_API_PATH="http://localhost:8080"
VITE_API_PATH="http://3.94.101.243:8080"
36 changes: 36 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Stage 1: Build the application
FROM node:21 AS build

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Clean npm cache and install dependencies without running the prepare script
RUN npm cache clean --force && npm install --legacy-peer-deps --ignore-scripts

# Copy the rest of the application files to the working directory
COPY . .

# (Optional) Build your application if needed
# RUN npm run build

# Stage 2: Create a lightweight production image
FROM node:21-slim AS production

# Set the working directory
WORKDIR /app

# Copy only the built application from the build stage
COPY --from=build /app ./

# Copy .env.sample to .env.local
COPY .env.sample .env.local

# Expose the port your app runs on
EXPOSE 5173

# Specify the command to run your application
CMD ["npm", "run", "dev", "--", "--host"]

Loading