Skip to content

React.js, node.js, typescript, kubernetes, docker, sql

Notifications You must be signed in to change notification settings

kunjolee/bootcam-w2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RUN

DATABASE

# Run postgres
    # -p 5433:5432 \
    docker run \
    -p 5432:5432 \
    -e POSTGRES_PASSWORD=mysecretpassword \
    -e POSTGRES_USER=testdocker \
    -e PGDATA=/var/lib/postgresql/data/pgdata \
    -v PGDISCO:/var/lib/postgresql/data \
    -v $(pwd)/db:/docker-entrypoint-initdb.d \
    -d postgres:14.6  

BACKEND

# Dev purposes
    docker run \
    -v $(pwd)/bank-backend:/code \
    -e APP_PORT=8001 \
    -e DB_NAME=testdocker \
    -e USER_NAME=testdocker \
    -e DB_PASSWORD=mysecretpassword \
    -e HOST=172.17.0.2 \
    -e DB_PORT=5432 \
    -w /code \
    -p 8001:8001 \
    --rm -it node:16-buster "/bin/bash"

# Build
    docker build -t backend:1.0.0 bank-backend
    docker build --no-cache -t backend:1.0.0 bank-backend

# RUN
    docker run -e HOST=172.17.0.3 -d -p 8001:8001 backend:1.0.0

FRONTEND

# Dev purposes
    docker run \
    -v $(pwd)/bank-frontend:/code \
    -e VITE_API_URL=http://localhost:8001
    -w /code \
    -p 5173:5173 \
    --rm -it node:16-buster-slim "/bin/bash"

# Build
    docker build -t frontend:1.0.0-alpine bank-frontend
# RUN
    docker run -d -p 4173:80 frontend:1.0.0-alpine

About

React.js, node.js, typescript, kubernetes, docker, sql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published