Placemark was originally developed without using Docker, so the Docker configuration is a little new. Note that this docker configuration is optimized for development - we don't yet have a configuration for production.
cp .env.example .env.local
.env.local
NEXT_PUBLIC_MAPBOX_TOKEN=YOUR_MAPBOX_ACCESS_TOKEN
docker-compose build
docker-compose up
docker-compose up -d
- Open localhost:3000 for the server.
- Open localhost:5555 for the Prisma database browser.
docker-compose logs -f
docker-compose logs -f web
or
docker logs placemark-web
docker-compose logs -f db
or
docker logs placemark-db
docker-compose logs -f prisma
or
docker logs placemark-studio
docker-compose down
docker-compose stop prisma
docker-compose exec db psql -U postgres -d placemark
docker-compose exec prisma npx prisma studio
docker-compose exec prisma npx prisma migrate dev --name init
docker-compose exec prisma npx prisma generate
docker-compose exec prisma npx prisma db pull
docker-compose exec web bash
docker-compose exec db bash
docker-compose up -d --build --force-recreate web
docker-compose restart web
Note: We are not exposing the database to the host machine, so you can't connect to the database using a database client like pgAdmin or DBeaver. If you want to connect to the database, you can use the terminal access to the db service. If you want to expose the database to the host machine, you can add the following line to the db service in the docker-compose.yml file.
ports:
- "5432:5432"