Skip to content

Commit

Permalink
Merge pull request #124 from Synthetixio/docker-optimizations
Browse files Browse the repository at this point in the history
minor optimizations for docker files
  • Loading branch information
Tburm authored Oct 3, 2024
2 parents 1971efd + be85629 commit 225e77c
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dashboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base image
FROM python:3.11
FROM python:3.11-slim

# Create app directory
WORKDIR /app
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: "2.4"

services:
db:
image: ghcr.io/synthetixio/data/postgres:${VERSION}
build:
context: ./postgres
dockerfile: Dockerfile
Expand All @@ -28,6 +29,7 @@ services:
memory: 8192M

eth-mainnet-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-mainnet
build:
context: ./indexers/eth-mainnet
networks:
Expand All @@ -44,6 +46,7 @@ services:
RPC_ENDPOINT: https://ethereum-rpc.publicnode.com

base-mainnet-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-base-mainnet
build:
context: ./indexers/base-mainnet
networks:
Expand All @@ -60,6 +63,7 @@ services:
RPC_ENDPOINT: https://mainnet.base.org

base-sepolia-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-base-sepolia
build:
context: ./indexers/base-sepolia
networks:
Expand All @@ -76,6 +80,7 @@ services:
RPC_ENDPOINT: https://sepolia.base.org

arbitrum-sepolia-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-arbitrum-sepolia
build:
context: ./indexers/arbitrum-sepolia
networks:
Expand All @@ -92,6 +97,7 @@ services:
RPC_ENDPOINT: https://sepolia-rollup.arbitrum.io/rpc

arbitrum-mainnet-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-arbitrum-mainnet
build:
context: ./indexers/arbitrum-mainnet
networks:
Expand All @@ -108,6 +114,7 @@ services:
RPC_ENDPOINT: wss://arbitrum-one-rpc.publicnode.com

optimism-mainnet-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-optimism-mainnet
build:
context: ./indexers/optimism-mainnet
networks:
Expand All @@ -124,6 +131,7 @@ services:
RPC_ENDPOINT: https://mainnet.optimism.io

snax-testnet-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-snax-testnet
build:
context: ./indexers/snax-testnet
networks:
Expand All @@ -141,6 +149,7 @@ services:
API_KEY: $CONDUIT_API_KEY

snax-mainnet-processor:
image: ghcr.io/synthetixio/data/indexer:${VERSION}-snax-mainnet
build:
context: ./indexers/snax-mainnet
networks:
Expand All @@ -158,6 +167,7 @@ services:
API_KEY: $CONDUIT_API_KEY

transformer:
image: ghcr.io/synthetixio/data/transformer:${VERSION}
build:
context: ./transformers
depends_on:
Expand All @@ -171,6 +181,7 @@ services:
- data

extractors:
image: ghcr.io/synthetixio/data/extractors:${VERSION}
build:
context: ./extractors
env_file:
Expand All @@ -180,6 +191,7 @@ services:
- ./parquet-data:/parquet-data

dashboard:
image: ghcr.io/synthetixio/data/dashboard:${VERSION}
build:
context: ./dashboard
restart: always
Expand Down
2 changes: 1 addition & 1 deletion extractors/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN pip install maturin
RUN maturin build --release

# install wheel package and run
FROM python:3.11 as runtime
FROM python:3.11-slim as runtime

WORKDIR /app

Expand Down
5 changes: 3 additions & 2 deletions indexers/arbitrum-mainnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/arbitrum-sepolia/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/base-mainnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/base-sepolia/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/eth-mainnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/optimism-mainnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/snax-mainnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
5 changes: 3 additions & 2 deletions indexers/snax-testnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:16
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci
RUN apk add --no-cache python3
RUN apk add --no-cache build-base && npm ci && apk del build-base

COPY . .

Expand Down
2 changes: 1 addition & 1 deletion transformers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base image
FROM python:3.11
FROM python:3.11-slim

# Create app directory
WORKDIR /app
Expand Down

0 comments on commit 225e77c

Please sign in to comment.