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

Remove Postgresql from the Docker build #3208

Merged
merged 1 commit into from
Oct 18, 2024
Merged
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
4 changes: 0 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
DATABASE_URL=postgresql://spotlight_user:spotlight_password@db/spotlight?pool=5
POSTGRES_DATABASE=spotlight
POSTGRES_PASSWORD=spotlight_password
POSTGRES_USER=spotlight_user
RACK_ENV=development
RAILS_ENV=development
RAILS_LOG_TO_STDOUT=true
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ RUN apk --no-cache upgrade && \
libxslt-dev \
nodejs \
npm \
postgresql-dev \
shared-mime-info \
sqlite-dev \
tini \
Expand All @@ -46,10 +45,7 @@ RUN mkdir -p /spotlight/app
WORKDIR /spotlight/app

RUN SKIP_TRANSLATION=yes rails _${RAILS_VERSION}_ new . --force --template=../engine/template.rb
RUN bundle add pg
RUN yarn add @babel/plugin-proposal-private-methods --dev
RUN yarn add @babel/plugin-proposal-private-property-in-object
RUN SKIP_TRANSLATION=yes DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
RUN SKIP_TRANSLATION=yes DB_ADAPTER=nulldb bundle exec rake assets:precompile

ENTRYPOINT ["/sbin/tini", "--", "/spotlight/engine/bin/docker-entrypoint.sh"]
CMD ["bundle", "exec", "puma", "-b", "tcp://0.0.0.0:3000"]
10 changes: 0 additions & 10 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,12 @@ services:
environment:
SKIP_TRANSLATION: "yes"
entrypoint: sh -c '/spotlight/engine/bin/db-migrate-seed.sh'
depends_on:
- db
volumes:
- .:/spotlight/engine
- spotlight_app:/spotlight/app
networks:
- spotlight

db:
image: postgres:13
ports:
- 5432:5432
volumes:
- spotlight_db/var/lib/postgresql/data

solr:
environment:
- SOLR_PORT # Set via environment variable or use default defined in .env file
Expand All @@ -60,7 +51,6 @@ services:

volumes:
spotlight_app:
spotlight_db:

networks:
spotlight:
Expand Down