diff --git a/.env b/.env index a55592e..95dfe58 100644 --- a/.env +++ b/.env @@ -9,8 +9,13 @@ DB_USER=joshbaney DB_PASSWORD=Ran0dal5! DB_NAME=heatmap -# Slack Incoming Webhook URL -SLACK_WEBHOOK_URL=https://hooks.slack.com/triggers/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 +#AWS s3 +S3_BUCKET_URL=https://s3.amazonaws.com/bwi2temps/trends -AWS s3 -S3_BUCKET_URL=https://s3.amazonaws.com/your‐bucket/trends +# Slack & AWS creds +SLACK_WEBHOOK_URL=https://hooks.slack.com/triggers/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 +AWS_ACCESS_KEY_ID=ihya/m4CONlywOPCNER22oZrbOeCdJLxp3R4H3oF +AWS_SECRET_ACCESS_KEY=AKIAQ3EGSIYOYP4L37HH +AWS_REGION=us-east-2 +S3_BUCKET_NAME=bwi2temps +S3_BASE_URL=https://s3.amazonaws.com/bwi2temps/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 26c51a8..4964504 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,16 @@ -# Use official Node.js 18 LTS alpine image +# Dockerfile FROM node:18-alpine # Create app directory -WORKDIR /app +WORKDIR /usr/src/app -# Install app dependencies +# Install dependencies COPY package*.json ./ RUN npm install --production -# Copy source +# Bundle app source COPY . . -# Expose port +# Expose port and run EXPOSE 3000 - -# Start the server -CMD ["npm", "start"] +CMD ["node", "server.js"] diff --git a/docker-compose.yaml b/docker-compose.yaml index f7f64bc..44163d0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,32 +1,13 @@ +# docker-compose.yaml version: '3.8' services: - db: - image: mariadb:10.11 - restart: always - environment: - MYSQL_ROOT_PASSWORD: example_root_password - MYSQL_DATABASE: heat_tracker - MYSQL_USER: heat_user - MYSQL_PASSWORD: StrongP@ssw0rd - volumes: - - db_data:/var/lib/mysql - - app: + fuego-app: build: . - restart: always + env_file: .env # your DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, SLACK_WEBHOOK_URL, etc. ports: - "3000:3000" - env_file: - - .env - environment: - # override DB_HOST to point at our db service - DB_HOST: db - DB_PORT: 3306 - depends_on: - - db volumes: - - .:/app - -volumes: - db_data: + - .:/usr/src/app # live code reload; remove in prod if undesired + restart: unless-stopped + # no depends_on here since the DB lives elsewhere diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..63cd579 --- /dev/null +++ b/public/index.html @@ -0,0 +1,71 @@ + + +
+ +Date/Time | +Temperature | +Humidity | +Heat Index | +Location | +Direction | +
---|