Skip to content

Commit

Permalink
build: remove production PostgreSQL container
Browse files Browse the repository at this point in the history
Related to #96
  • Loading branch information
JoosepAlviste committed Jan 28, 2024
1 parent f7dd7d5 commit 339720f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ In production, the API and the webapp are run inside Docker like so:
docker-compose -f docker-compose.production.yml up
```

[Neon](https://neon.tech) is used as a managed PostgreSQL service.

The pipeline builds Docker images, pushes them to the GitHub registry, SSH-es
into the server, and pulls the images.

Expand Down
19 changes: 0 additions & 19 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,6 @@ services:
caddy: serieslist.joosep.xyz
caddy.reverse_proxy: "{{upstreams ${VITE_APP_PORT}}}"

db:
image: postgres:15.2-alpine
ports:
- '${DB_PORT}:5432'
volumes:
- 'pgdata:/var/lib/postgresql/data'
- ./bin/create-multiple-postgresql-databases.sh:/docker-entrypoint-initdb.d/create-multiple-postgresql-databases.sh
# Make Postgres faster
# https://github.com/testjavascript/nodejs-integration-tests-best-practices#%EF%B8%8F-4-optimize-your-real-db-for-testing-dont-fake-it
command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0
environment:
POSTGRES_MULTIPLE_DATABASES: ${DB_DB}_test
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DB}
networks:
- caddy

redis:
image: redis:7.0-alpine
restart: always
Expand All @@ -84,7 +66,6 @@ services:
- caddy

volumes:
pgdata:
redisdata:

networks:
Expand Down

0 comments on commit 339720f

Please sign in to comment.