diff --git a/.dockerignore b/.dockerignore index a6e11805e9..4d406e6791 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,6 +5,7 @@ !Cargo.lock !Makefile +!tmp-proxy-test/ !.cargo/ !.config/ !control_plane/ diff --git a/Dockerfile b/Dockerfile index 6f7d2c32a5..39d1fad65f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ COPY --chown=nonroot . . # Show build caching stats to check if it was used in the end. # Has to be the part of the same RUN since cachepot daemon is killed in the end of this RUN, losing the compilation stats. RUN set -e \ -&& mold -run cargo build --bin pageserver --bin pageserver_binutils --bin draw_timeline_dir --bin safekeeper --bin storage_broker --bin proxy --locked --release \ +&& mold -run cargo build --bin proxy --locked --release \ && cachepot -s # Build final image @@ -63,11 +63,11 @@ RUN set -e \ && useradd -d /data neon \ && chown -R neon:neon /data -COPY --from=build --chown=neon:neon /home/nonroot/target/release/pageserver /usr/local/bin -COPY --from=build --chown=neon:neon /home/nonroot/target/release/pageserver_binutils /usr/local/bin -COPY --from=build --chown=neon:neon /home/nonroot/target/release/draw_timeline_dir /usr/local/bin -COPY --from=build --chown=neon:neon /home/nonroot/target/release/safekeeper /usr/local/bin -COPY --from=build --chown=neon:neon /home/nonroot/target/release/storage_broker /usr/local/bin +# COPY --from=build --chown=neon:neon /home/nonroot/target/release/pageserver /usr/local/bin +# COPY --from=build --chown=neon:neon /home/nonroot/target/release/pageserver_binutils /usr/local/bin +# COPY --from=build --chown=neon:neon /home/nonroot/target/release/draw_timeline_dir /usr/local/bin +# COPY --from=build --chown=neon:neon /home/nonroot/target/release/safekeeper /usr/local/bin +# COPY --from=build --chown=neon:neon /home/nonroot/target/release/storage_broker /usr/local/bin COPY --from=build --chown=neon:neon /home/nonroot/target/release/proxy /usr/local/bin COPY --from=pg-build /home/nonroot/pg_install/v14 /usr/local/v14/ @@ -76,13 +76,13 @@ COPY --from=pg-build /home/nonroot/postgres_install.tar.gz /data/ # By default, pageserver uses `.neon/` working directory in WORKDIR, so create one and fill it with the dummy config. # Now, when `docker run ... pageserver` is run, it can start without errors, yet will have some default dummy values. -RUN mkdir -p /data/.neon/ && chown -R neon:neon /data/.neon/ \ - && /usr/local/bin/pageserver -D /data/.neon/ --init \ - -c "id=1234" \ - -c "broker_endpoint='http://storage_broker:50051'" \ - -c "pg_distrib_dir='/usr/local/'" \ - -c "listen_pg_addr='0.0.0.0:6400'" \ - -c "listen_http_addr='0.0.0.0:9898'" +# RUN mkdir -p /data/.neon/ && chown -R neon:neon /data/.neon/ \ +# && /usr/local/bin/pageserver -D /data/.neon/ --init \ +# -c "id=1234" \ +# -c "broker_endpoint='http://storage_broker:50051'" \ +# -c "pg_distrib_dir='/usr/local/'" \ +# -c "listen_pg_addr='0.0.0.0:6400'" \ +# -c "listen_http_addr='0.0.0.0:9898'" VOLUME ["/data"] USER neon diff --git a/tmp-proxy-test/Dockerfile b/tmp-proxy-test/Dockerfile index b85fdeab10..91ccffee07 100644 --- a/tmp-proxy-test/Dockerfile +++ b/tmp-proxy-test/Dockerfile @@ -1,4 +1,4 @@ -FROM neondatabase/neon:latest +FROM neondatabase/neon:local USER root RUN apt-get update && apt-get install -y curl diff --git a/tmp-proxy-test/index.js b/tmp-proxy-test/index.js index a5007ccb80..fbf0988da2 100644 --- a/tmp-proxy-test/index.js +++ b/tmp-proxy-test/index.js @@ -5,7 +5,7 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; (async () => { try { neonConfig.wsProxy = (host, _port) => host + ':7500/v2' - // neonConfig.pipelineConnect = "password"; + neonConfig.pipelineConnect = "password"; const client = new Client({ connectionString: 'postgres://neon:test@pg.localtest.me/postgres',