Skip to content

awforsythe/fossils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fossils

A handy tool for tracking fossil collection among friends in Animal Crossing: New Horizons.

To build and run all containers, using docker-compose:

  • Production: docker-compose up --build
  • Development: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
  • Frontend will be accessible via http://localhost:3000.

The database volume (fossils_pgdata) will persist after shutting down; you can purge it with docker-compose down -v to clear all data and start fresh on your next run.

db

To spin up a database container in Docker for testing:

  • cd db
  • docker volume create pgtest (Will persist; remove with docker volume rm pgtest)
  • docker build -t fossils-db .
  • docker run -p 5442:5432 -v pgtest:/var/lib/postgresql/data -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres fossils-db
  • Connect a postgres terminal with psql -p 5442 -U postgres -d postgres (password is postgres).
  • Container will be left running; use docker ps and docker stop <container-id> to shut it down.

app

To run the app locally:

To build and run the app with Docker:

  • cd app
  • docker build -t fossils-app:dev -f Dockerfile-dev . (production: docker build -t fossils-app .)
  • docker run -p 3001:8080 -v e:/fossils/app:/usr/src/app fossils-app:dev (production: docker run -p 3001:8080 fossils-app)
  • Replace e:/fossils with the path where you've cloned this repo.
  • API will be accessible via http://localhost:3001/api.
  • Container will be left running; use docker ps and docker stop <container-id> to shut it down.

frontend

To build the frontend locally:

  • cd frontend
  • npm install
  • npm run build:dev (production: npm run build)
  • Webpack build artifacts will be in frontend/public.

To build and serve the frontend with Docker:

  • cd frontend
  • docker build -t fossils-frontend:dev -f Dockerfile-dev . (production: docker build -t fossils-frontend .)
  • docker run -p 3002:8080 -v e:/fossils/frontend/src:/usr/src/app/src fossils-frontend:dev (production: docker run -p 3002:8080 fossils-frontend)
  • Replace e:/fossils with the path where you've cloned this repo.
  • Frontend will be accessible via http://localhost:3002.
  • Container will be left running; use docker ps and docker stop <container-id> to shut it down.

nginx

The nginx container sits in front of the backend app and the frontend, and serves as a reverse proxy to route requests to the appropriate service.

About

A little webapp for tracking Animal Crossing: New Horizons fossil collections with a group of friends

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published