Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I forked this repo and made possible Meteor 3 deployment. #151

Open
gustawdaniel opened this issue Feb 24, 2024 · 4 comments
Open

I forked this repo and made possible Meteor 3 deployment. #151

gustawdaniel opened this issue Feb 24, 2024 · 4 comments

Comments

@gustawdaniel
Copy link
Contributor

How to migrate.

Replace:

FROM jshimko/meteor-launchpad:latest as build

by

FROM gustawdaniel/meteor-launchpad:latest as build

in your Dockerfile.

If you have to deploy meteor 2 add

PYTHON_VERSION=2.7

in launchpad.conf

By default I am using 3.6.0

Repo:

https://github.com/gustawdaniel/meteor-launchpad/tree/master

@gustawdaniel
Copy link
Contributor Author

@jshimko we can add this to your repo if you want. There is open PR to install python by conda

@gustawdaniel
Copy link
Contributor Author

gustawdaniel commented Mar 1, 2024

Now PYTHON_VERSION isn't required in launchpad.conf because we can derive it from node js version

@gustawdaniel
Copy link
Contributor Author

Now meteor 3 is installed by npx instead of bash script

@gustawdaniel
Copy link
Contributor Author

I created simplified Dockerfile and resigned from instalation nodejs during meteor app build. There is my new Dockerfile for stable meteor v3

FROM node:20-bullseye-slim

# Install dependencies
RUN apt-get update && apt-get install -y \
    curl \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Create a non-root user and set permissions
RUN useradd --create-home --shell /bin/bash meteoruser
WORKDIR /opt/meteor
COPY . .

RUN chown -R meteoruser:meteoruser /opt/meteor
RUN mkdir -p /opt/dist && chown -R meteoruser:meteoruser /opt/dist

# Switch to the non-root user
USER meteoruser

# Install Meteor using npx and other dependencies
RUN npx meteor
RUN npm ci

# Build the Meteor application
RUN /home/meteoruser/.meteor/meteor build --directory /opt/dist --server-only

# Install server dependencies for the built app
RUN cd /opt/dist/bundle/programs/server && npm install --omit=dev --verbose

# Expose the Meteor default port
EXPOSE 3000

# Switch to the non-root user for running the app
USER meteoruser
WORKDIR /opt/dist/bundle

# Start the Meteor application
CMD ["node", "main.js"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant