Skip to content

Commit 3c94de4

Browse files
committed
asdf
1 parent 25b703a commit 3c94de4

File tree

20 files changed

+357
-145
lines changed

20 files changed

+357
-145
lines changed

samples/platformatic/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

samples/platformatic/app/.env.sample

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ PLT_SERVER_HOSTNAME=127.0.0.1
22
PORT=3042
33
PLT_SERVER_LOGGER_LEVEL=info
44
PLT_MANAGEMENT_API=true
5-
PLT_APP_TYPESCRIPT=false
6-
PLT_APP_EXAMPLE_ORIGIN=http://127.0.0.1:3043
5+
PLT_SERVICE1_TYPESCRIPT=false
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
# Use the official Node.js Alpine image as a parent image
2-
FROM node:alpine
1+
# Use the official Node.js image as the base image
2+
FROM node:20-bookworm-slim
33

4-
# Install dependencies for building native modules
5-
RUN apk add --no-cache \
6-
python3 \
7-
make \
8-
g++
9-
10-
# Set the working directory in the container
4+
# Set the working directory inside the container
115
WORKDIR /app
126

13-
# Copy package.json and package-lock.json
7+
# Copy package.json and package-lock.json to the working directory
148
COPY package*.json ./
159

16-
# Install node modules
10+
# Install the dependencies
1711
RUN npm install --production
1812

19-
# Copy the rest of the application code
13+
# Copy the rest of the application code to the working directory
2014
COPY . .
2115

22-
# Expose the port that the app runs on
16+
# Expose the application port
2317
EXPOSE 3042
2418

25-
# Command to run the application
19+
# Define the command to run your application
2620
CMD ["npm", "start"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
platformatic-app:
3+
build: .
4+
ports:
5+
- target: 3042
6+
published: 3042
7+
protocol: tcp
8+
mode: ingress
9+
environment:
10+
NODE_ENV: production
11+
restart: always
12+
volumes:
13+
- .:/app
14+
- /app/node_modules

0 commit comments

Comments
 (0)