- Install
node
,Python
,R
,Podman
(orDocker
), - Set up podman or Set up Docker
- Install
podman-compose
usingbrew install podman-compose
- Initialize the podman using
podman machine start
. - Run
npm run start:dev
. This will build all necessary images, and start up relevant containers in a development environment. For production environment, executenpm run start:prod
instead. - Individual parts of the application can be accessed from your browser or from the terminal under these domains:
- React application:
127.0.0.1:3000
- Flask application:
127.0.0.1:8080
- R:
127.0.0.1:8787
- React application:
- You can check that the containers are up and running by calling
podman ps -a
from another terminal instance. - Upon pressing Ctrl+C in the terminal instance where the
start:dev
command was executed, all of the running containers will be gracefully shut down and deleted. - Any images built during the process will remain present. You can check the list of these images by running
podman images
. Remove these usingpodman rmi [image-name]
, orpodman rmi -a
, which will remove all images. - You can also access any of the containers by using
localhost
as the host name, such aslocalhost:3000
for the React application.
There are several pre-defined node scripts which should help you work with images and containers. All of these can be executed using npm run [script-name]
Here is a list of some of them:
images:build
: Builds the Docker images only if they don't already exist.images:rebuild
: Forces the rebuild of all Docker images.images:rebuild-<image-tag>
: Force the rebuild of a single Docker image (specified by<image-tag>
). E.g.,bun run images:rebuild-react
rebuilds the React image.images:rename
: Renames all existing images to match the current project version.start:dev
: Builds any missing images and starts up all containers in a development environment. Upon Ctrl+C, all of the containers will be gracefully shut down and deleted.start:prod
: Very similar tostart:dev
, but builds and starts the containers in a production environment.stop
: Stops and removes all existing containers.
-
Remove empty images
podman images --format "{{.ID}}: {{.Repository}}:{{.Tag}}" | grep '<none>' | awk -F: '{print $1}' | xargs -I {} podman rmi {}
-
Get logs of a container that is running in a detached mode
podman logs -f <container-name>
- React with Next.js
- Flask
- R API endpoint through Plumber
- Containers using Podman (or Docker)
- Retro-board GH repo - For integrating PostgreSQL into the project