Full application docker compose set up

This commit is contained in:
Alex Holliday committed 2024-06-24 16:09:51 -07:00
1 parent 11c1819951
commit 531eb0b857
11 files changed
+93 -53

No files matched your search

-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
# Change directory to root Server directory for correct Docker Context
cd ..
# MongoDB
mongoDB="./docker/mongoDB.Dockerfile"
# Redis
redis="./docker/redis.Dockerfile"
# Server
server="./docker/server.Dockerfile"
docker build -f $mongoDB -t uptime_database_mongo .
docker build -f $redis -t uptime_redis .
docker build -f $server -t uptime_server .
echo "All images built"
-24
View File
@@ -1,24 +0,0 @@
version: "3"
services:
server:
image: uptime_server:latest
ports:
- "5000:5000"
env_file:
- .env
depends_on:
- redis
- mongodb
redis:
image: uptime_redis:latest
ports:
- "6379:6379"
volumes:
- ./redis/data:/data
mongodb:
image: uptime_database_mongo:latest
command: ["mongod", "--quiet"]
ports:
- "27017:27017"
volumes:
- ./mongo/data:/data/db
-2
View File
@@ -1,2 +0,0 @@
FROM mongo
EXPOSE 27017
-2
View File
@@ -1,2 +0,0 @@
FROM redis
EXPOSE 6379
-13
View File
@@ -1,13 +0,0 @@
FROM node:20
WORKDIR /app
COPY ../../package*.json ./
RUN npm install
COPY ../../ ./
EXPOSE 5000
CMD ["node", "index.js"]