- Install Docker and Docker Compose
- Copy
docker-compose.yamlto your project directory - Use
docker-compose upto start the server
- Install Docker
- Pull the image from Docker Hub:
docker pull ghcr.io/swaggeroo/meta-tic-tac-toe - Run own mongo instance:
docker run -d --name mongo mongo - Run the server:
docker run -d --name meta-tic-tac-toe -p 80:3000 --env mongoUrl=mongodb://mongo/metaTicTacToe ghcr.io/swaggeroo/meta-tic-tac-toe
- Install Node.js
- Install MongoDB
- Clone the repository:
git clone https://github.com/Swaggeroo/MetaTicTacToe.git - Install dependencies:
npm install - Start the server:
npm start - Set environment variables:
mongoUrl: The URL of the MongoDB instance
mongoUrl: The URL of the MongoDB instance
Optionally, you can set the following environment variables:
| Variable | Default Value | Description |
|---|---|---|
PORT |
3000 |
The port the server listens on (Also change port from docker deployment if in use) |
DEBUG |
Set it to app:* to see debug output |
|
mongoUser |
Set username for mongodb | |
mongoPassword |
Set password for mongodb |