Skip to content

Commit 7876111

Browse files
committed
Fix setup for devcontainers
Since PostgreSQL 18, data stored within the Docker volume is also version-prefixed. Thus, we need to change the path slightly. Furthermore, we don't want the web service to be started automatically when _building_ the devcontainer. Otherwise, the building process won't finish at all. Finally, we need to install `libicu-dev` explicitly by now. Previously, it was included in the upstream image, but this changed some time ago.
1 parent c500f47 commit 7876111

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
22
ARG RUBY_VERSION=3.4.7
33
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
4+
5+
# Set up machine requirements for the gems
6+
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
7+
&& sudo apt-get -y install --no-install-recommends \
8+
libicu-dev # Required for charlock_holmes

.devcontainer/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
networks:
3232
- default
3333
volumes:
34-
- postgres-data:/var/lib/postgresql/data
34+
- postgres-data:/var/lib/postgresql
3535
environment:
3636
POSTGRES_USER: postgres
3737
POSTGRES_PASSWORD: postgres

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444

4545

4646
// Use 'postCreateCommand' to run commands after the container is created.
47-
"postCreateCommand": "bin/setup"
47+
"postCreateCommand": "bin/setup --skip-server"
4848
}

0 commit comments

Comments
 (0)