diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1d5c5b9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +# For development purposes only +**/node_modules +.env +**/dist +**/venv +*.log +**/__pycache__ +docker-compose-dev.yml diff --git a/.gitignore b/.gitignore index dd486a0..4eeccd3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ venv __pycache__ node_modules +docker-compose-dev.yml diff --git a/Dockerfile b/Dockerfile index fe009eb..9382d9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,33 +2,38 @@ # the application FROM node:25-alpine -# WARNING: These ports are the default ports for the app, you should probably -# change them eventually, OR use docker-compose.yml to change them. -EXPOSE 8000 -EXPOSE 3000 +WORKDIR /app RUN <>.env -# env | grep CURRENT_DOMAIN >>.env -#fi - -# If virtual environment does exist.. -if [ ! -d venv ]; then - python3 -m venv venv - source venv/bin/activate - pip install -U -r requirements.txt - pip install -U pip -fi - -# Assuming that your environemnt is already setup -if [ -d venv ]; then - pip install -U -r requirements.txt -fi diff --git a/run.bash b/run.bash deleted file mode 100755 index b121a81..0000000 --- a/run.bash +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -source ./api/venv/bin/activate - -cd ./frontend/ || exit - -# NOTE: Hopefully this runs these two in the background. -npm run start & -( - cd ../api/src || exit - fastapi run -) & diff --git a/start.bash b/start.bash new file mode 100755 index 0000000..32c8c2b --- /dev/null +++ b/start.bash @@ -0,0 +1,8 @@ +#!/bin/bash +echo "$@" + +if [[ $1 == "web" ]]; then + cd ./frontend/ && npm run start +elif [[ $1 == "api" ]]; then + cd ./api/ && source venv/bin/activate && cd ./src && fastapi run +fi