diff --git a/INSTALLING.md b/INSTALLING.md index 1cf86c94d..3a2b4579d 100644 --- a/INSTALLING.md +++ b/INSTALLING.md @@ -18,7 +18,7 @@ To get started, you will need: - Preferably a Linux installation, but MacOS or WSL2 should work too - Git -- Docker and docker-compose\ +- Docker and docker-compose ```shell sudo apt install git docker.io docker-compose diff --git a/docker-compose.yml b/docker-compose.yml index 210e440af..8f8a858e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,10 +9,9 @@ services: # ALLOW_EMPTY_PASSWORD is recommended only for development. - ALLOW_EMPTY_PASSWORD=yes - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL - ports: - - '6379:6379' volumes: - 'redis_data:/bitnami/redis/data' + network_mode: "host" postgres-db: image: postgres:13 @@ -20,39 +19,32 @@ services: environment: POSTGRES_USER: koala POSTGRES_PASSWORD: "koala123" - - ports: - - "5432:5432" + network_mode: "host" # FIXME: Koala breaks css and js when trying to connect with the - # webpack-dev-server (and failing). The connection is disabled in in + # webpack-dev-server (and failing). The connection is disabled in # webpacker.yml for now. - webpack-dev-server: - build: . + # webpack-dev-server: + # build: . - command: [ "bundle", "exec", "./bin/webpack-dev-server" ] + # command: [ "bundle", "exec", "./bin/webpack-dev-server" ] - volumes: - - ./app:/app/app:ro - - ./bin:/app/bin:ro - # Make this directory writable inside the container, and persist changes - # accross reloads (but not on the host). - - 'webpack_data:/app/public/packs' - ports: - - 3035:3035 + # volumes: + # - ./app:/app/app:ro + # - ./bin:/app/bin:ro + # # Make this directory writable inside the container. + # - ./public/packs:/app/public/packs + # network_mode: "host" koala-development: build: . command: [ "rails", "server", "--binding", "0.0.0.0" ] - env_file: - - .env - depends_on: - postgres-db - redis - - webpack-dev-server + # - webpack-dev-server volumes: # Mount the sourcecode in the container, so changes end up in the @@ -65,12 +57,10 @@ services: - ./lib:/app/lib:ro - ./test:/app/test:ro - ./vendor:/app/vendor:ro + - ./.env:/app/.env:ro - ports: - - 3000:3000 + network_mode: "host" volumes: redis_data: driver: local - webpack_data: - driver: local diff --git a/sample.env b/sample.env index 0befa2dde..9267930b5 100644 --- a/sample.env +++ b/sample.env @@ -3,7 +3,7 @@ # Mollie, some test secrets have to be put in this file. ### Database setup ### -DATABASE_HOST=postgres-db +DATABASE_HOST=localhost DATABASE_USER=koala DATABASE_PASSWORD=koala123 DATABASE_PORT=5432