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

Update docker and upgrade packages to reflect changes #171

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- run: yarn
- run: npm run lint
Expand Down
54 changes: 50 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,58 @@
FROM node:17-slim
FROM --platform=linux/amd64 node:20-slim

RUN apt-get update
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget
# Install required packages
RUN apt-get update && apt-get install -y \
wget \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgbm1 \
libgcc1 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
xdg-utils \
libdrm2 \
libice6 \
libsm6 \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app/instauto

# Copy project files to the container
COPY . /app/instauto

RUN yarn
# Install dependencies
RUN yarn install --frozen-lockfile

# Start the application
CMD ["node", "/app/instauto/example.js"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](logo.png)
![instauto](logo.png)

[![Discord](https://img.shields.io/discord/986052713425027072)](https://discord.gg/Rh3KT9zyhj) [![PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mifino/usd)

Expand Down
12 changes: 8 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
instauto:
build:
Expand All @@ -13,11 +12,16 @@ services:
- FOLLOW_USER_RATIO_MIN=0.2
- FOLLOW_USER_RATIO_MAX=4.0
- USERS_TO_FOLLOW=everchanginghorizon,sam_kolder
entrypoint: ["node", "/app/instauto/example.js"]
entrypoint: [ "node", "/app/instauto/example.js" ]
deploy:
resources:
limits:
cpus: "0.1"
cpus: "0.2"
memory: 256M
profiles:
["instauto"]
- "instauto"
volumes:
- instabot:/app/data/

volumes:
instabot:
6 changes: 6 additions & 0 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ const options = {
// Needed for docker
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-accelerated-2d-canvas',
'--no-first-run',
'--no-zygote',
'--single-process',
'--disable-gpu',

// If you need to proxy: (see also https://www.chromium.org/developers/design-documents/network-settings)
// '--proxy-server=127.0.0.1:9876',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instauto",
"version": "9.2.1",
"version": "9.2.2",
"description": "Instagram automation library written in Node.js",
"main": "src/index.js",
"scripts": {
Expand All @@ -14,17 +14,17 @@
"repository": "mifi/instauto",
"license": "MIT",
"engines": {
"node": ">=8"
"node": ">=20"
},
"dependencies": {
"fs-extra": "^5.0.0",
"lodash": "^4.17.10",
"user-agents": "^1.0.559"
"puppeteer": "^22.6.5",
"user-agents": "^1.1.178"
},
"devDependencies": {
"eslint": "^7.32.0 || ^8.2.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.2",
"puppeteer": "^1.19.0"
"eslint-plugin-import": "^2.25.2"
}
}
Loading
Loading