A GraphQL API to service the Learning Lynx frontend.
1.0K
A GraphQL API to service the LearningLinks frontend, an application that allows me to organize resources and links I want to learn from.
Learning Lynx Backend instance.Deploy to Vercel:
Learning Lynx Backend is a GraphQL API built with Typeorm and Type-GraphQL.
Use Yarn to install project dependencies.
# Install dependencies with Yarn
yarn install
# Start the development Server:
yarn dev:apollo
NOTE: If you have an NGROK account you will visit the NGROK url provided, or the subdomain you configured in the envrionemtn variables, you can find examples in the .env.example file.
Once you run this command you can visit the Learning Lynx GraphQL Playground in your browser
at http://localhost:1993/graphql. This starts the server in dev mode and
watches the project for any changes. You can run GrpahQL Queries in the GraphQL Playground and view the generated documentation.
Learning Lynx Frontend or your own server client: How to Make GraphQL RequestsStart the stack with Docker Compose:
docker-compose up -d
# View all container logs
docker-compose logs
# View specific container logs
docker-compose logs backend
docker ps -a
| Docker Container | Hostname | Exposed Location | Description |
|---|---|---|---|
kpcwebdev/learning_lynx-backend:latest | backend | http://localhost:1993/graphql | Backend GraphQL Server |
kpcwebdev/learning_lynx-frontend:latest | frontend | http://localhost:3000/ | Frontend Next.js Application |
PostgreSQL | db | http://localhost:5432/ | PostgreSQL Database Server |
Redis | redis | http://localhost:6379/ | Redis Server |
pgAdmin | pgadmin | http://localhost:5050/ | PostgreSQL Administration Tools |
Adminer | adminer | http://localhost:8080/ | Database Administration Tools |
MailHog | adminer | SMTP Port: 1025 MailHog UI Port: 8025 | Web and API based SMTP testing |
backend container volume has been mapped to the current working directory, this way you can make changes to the
codebase while the containers are running and see the changes immediately.The Makefile provided will help in creating Docker images and deploying a docker stack to a docker swarm locally
or to a swarm composed of DigitalOcean Droplets. The following
command will list available Make actions set in the Makefile.
make help
| Make Command | Description |
|---|---|
dev-image | Make a development Node.js image with dev/test dependencies for Next.js frontend |
dev-shell | Make a BASH shell in the dev docker container and remove it after shutdown |
run-dev_container | Make docker run the dev image and remove it after shutdown |
prod-image | Make a production Node.js image with optimized Next.js build |
prod-shell | Make a BASH hell in the production docker container and remove it after shutdown |
run-prod_container | Make docker run the prod image and remove it after shutdown |
docker-stack_local | Make a local deployment using docker-compose: docker stack -> docker swarm |
unstack | Make a local docker-compose deployment shutdown and remove docker stack and docker swarm |
Content type
Image
Digest
Size
640.6 MB
Last updated
almost 6 years ago
docker pull kpcwebdev/learning_lynx-backend