Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
realtime/Dockerfile at main · PapiDee09/realtime · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
PapiDee09
realtime
Repository navigation
Code
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
realtime
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
141 lines (116 loc) · 4.72 KB
main
Breadcrumbs
realtime
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
141 lines (116 loc) · 4.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
ARG
ELIXIR_VERSION=1.19.5
ARG
OTP_VERSION=28.5.0.4
ARG
DEBIAN_VERSION=trixie-20260713-slim
ARG
BUILDER_IMAGE=
"hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG
RUNNER_IMAGE=
"debian:${DEBIAN_VERSION}"
#
@supabase/pg-delta@1.0.0-alpha.48
ARG
PG_DELTA_COMMIT=107ac3df4b889c527215d1f6a37df64b33154c16
FROM
debian:${DEBIAN_VERSION} AS pgdelta-builder
ARG
PG_DELTA_COMMIT
ARG
BUN_VERSION=1.3.14
RUN
set -eux; \
apt-get update -y; \
apt-get install -y --no-install-recommends curl ca-certificates unzip xz-utils; \
curl -fsSL https://bun.sh/install | bash -s
"bun-v${BUN_VERSION}"
; \
export PATH=
"/root/.bun/bin:${PATH}"
; \
mkdir -p /build && cd /build; \
curl -fsSL
"https://github.com/supabase/pg-toolbelt/archive/${PG_DELTA_COMMIT}.tar.gz"
\
| tar xz --strip-components=1; \
bun install --frozen-lockfile --ignore-scripts; \
cd /build/packages/pg-delta; \
bun build --compile src/cli/main.ts --outfile /tmp/pgdelta; \
/tmp/pgdelta --help > /dev/null; \
xz -9 -e -T0 -c /tmp/pgdelta > /tmp/pgdelta.xz; \
cd / && find build -path
'*/@libpg-query/parser/wasm/libpg-query.wasm'
> /tmp/libpg-query.txt; \
test -s /tmp/libpg-query.txt; \
tar -czf /tmp/libpg-query.tar.gz -T /tmp/libpg-query.txt; \
printf
'%s
\n
'
\
'#!/bin/sh'
\
'set -e'
\
'BIN=/app/.pgdelta-cache/pgdelta'
\
'if [ ! -x "$BIN" ]; then'
\
' mkdir -p "$(dirname "$BIN")"'
\
' xz -dcT0 /usr/local/share/pgdelta/pgdelta.xz > "$BIN"'
\
' chmod +x "$BIN"'
\
'fi'
\
'exec "$BIN" "$@"'
\
> /tmp/pgdelta-wrapper; \
chmod +x /tmp/pgdelta-wrapper; \
rm -rf /tmp/pgdelta /tmp/libpg-query.txt /build /root/.bun /var/lib/apt/lists/*
FROM
${BUILDER_IMAGE} AS builder
ENV
MIX_ENV=
"prod"
RUN
apt-get update -y \
&& apt-get install curl -y \
&& apt-get install -y build-essential git \
&& apt-get clean
RUN
set -uex; \
apt-get update; \
apt-get install -y ca-certificates curl gnupg; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
NODE_MAJOR=24; \
echo
"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main"
\
> /etc/apt/sources.list.d/nodesource.list; \
apt-get -qy update; \
apt-get -qy install nodejs;
#
prepare build dir
WORKDIR
/app
#
install hex + rebar
RUN
mix local.hex --force && \
mix local.rebar --force
#
install mix dependencies
COPY
mix.exs mix.lock ./
COPY
forum forum
RUN
mix deps.get --only $MIX_ENV
RUN
mkdir config
#
copy compile-time config files before we compile dependencies
#
to ensure any relevant config change will trigger the dependencies
#
to be re-compiled.
COPY
config/config.exs config/${MIX_ENV}.exs config/
RUN
mix deps.compile
COPY
priv priv
COPY
lib lib
#
install js dependencies before the rest of assets, so editing a stylesheet or a hook does not
#
invalidate the install layer. `npm ci` installs exactly what the lockfile pins; `--omit=dev` keeps
#
the lint/format tooling (oxlint, oxfmt) out of the image build.
COPY
assets/package.json assets/package-lock.json assets/
RUN
cd assets && npm ci --omit=dev
COPY
assets assets
#
compile assets with esbuild and tailwind
RUN
mix assets.deploy
#
Compile the release
RUN
mix compile
#
Changes to config/runtime.exs don't require recompiling the code
COPY
config/runtime.exs config/
COPY
rel rel
RUN
mix release
#
start a new build stage so that the final image will only contain
#
the compiled release and other runtime necessities
FROM
${RUNNER_IMAGE}
ARG
SLOT_NAME_SUFFIX
ENV
SLOT_NAME_SUFFIX=
"${SLOT_NAME_SUFFIX}"
\
LANG=
"en_US.UTF-8"
\
LANGUAGE=
"en_US:en"
\
LC_ALL=
"en_US.UTF-8"
\
MIX_ENV=
"prod"
\
ECTO_IPV6=
"true"
\
ERL_AFLAGS=
"-proto_dist inet6_tcp"
RUN
apt-get update -y && \
apt-get install -y --no-install-recommends \
libstdc++6 openssl libncurses6 locales iptables sudo tini curl awscli jq xz-utils && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY
--from=pgdelta-builder /tmp/pgdelta.xz /usr/local/share/pgdelta/pgdelta.xz
COPY
--from=pgdelta-builder /tmp/pgdelta-wrapper /usr/local/bin/pgdelta
COPY
--from=pgdelta-builder /tmp/libpg-query.tar.gz /tmp/libpg-query.tar.gz
RUN
tar -C / -xzf /tmp/libpg-query.tar.gz && rm /tmp/libpg-query.tar.gz
#
Set the locale
RUN
sed -i
'/en_US.UTF-8/s/^# //g'
/etc/locale.gen && locale-gen
WORKDIR
"/app"
RUN
chown nobody /app && mkdir -p /app/.pgdelta-cache && chown nobody /app/.pgdelta-cache
COPY
--from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/realtime ./
COPY
run.sh run.sh
RUN
ls -la /app
USER
nobody
ENTRYPOINT
[
"/usr/bin/tini"
,
"-s"
,
"-g"
,
"--"
,
"/app/run.sh"
]
CMD
[
"/app/bin/server"
]
You can’t perform that action at this time.