Add build script

This commit is contained in:
Torben Haack 2024-10-09 15:19:55 +02:00
parent c704db14a4
commit 67ec8eebc8
3 changed files with 13 additions and 6 deletions

View File

@ -4,10 +4,8 @@ FROM node:20-bookworm
RUN mkdir -p /usr/src/app
# Set environment variables
ENV PORT 3000
ENV PORT=3000
ENV NEXT_TELEMETRY_DISABLED=1
ENV OAUTH_CLIENT_ID=client_id
ENV OAUTH_CLIENT_SECRET=client_secret
WORKDIR /usr/src/app

View File

@ -0,0 +1,11 @@
#!/bin/sh
# Build the Docker image
echo "Building the Docker image..."
if sudo docker build -t myp-rp:latest . -f Containerfile; then
echo "Docker image built successfully."
else
echo "Failed to build the Docker image."
exit 1
fi

View File

@ -1,8 +1,6 @@
services:
app:
build:
context: .
dockerfile: Containerfile
image: myp-rp:latest
ports:
- "REMOTE:3000"
environment: