Merge pull request 'Fix docker volume mappings for node_modules
, improve docker-compose usage' (#138) from bugfix/fix-docker-mapping into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #138 Reviewed-by: raucao <raucao@noreply.kosmos.org>
This commit is contained in:
commit
b32e2fcb7b
@ -9,9 +9,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
|
||||
RUN apt-get update && apt-get install -y nodejs
|
||||
|
||||
WORKDIR /akkounts
|
||||
COPY Gemfile /akkounts/Gemfile
|
||||
COPY Gemfile.lock /akkounts/Gemfile.lock
|
||||
COPY package.json /akkounts/package.json
|
||||
|
||||
COPY ["Gemfile", "Gemfile.lock", "package.json", "./"]
|
||||
|
||||
RUN bundle install
|
||||
RUN gem install foreman
|
||||
RUN npm install -g yarn
|
||||
|
11
README.md
11
README.md
@ -14,7 +14,6 @@ so:
|
||||
|
||||
1. Make sure [Docker Compose is installed][1] and Docker is running (included in
|
||||
Docker Desktop)
|
||||
2. Uncomment the `redis`, `web`, and `sidekiq` sections in `docker-compose.yml`
|
||||
3. Run `docker compose up` and wait until 389ds announces its successful start
|
||||
in the log output
|
||||
4. `docker-compose exec ldap dsconf localhost backend create --suffix="dc=kosmos,dc=org" --be-name="dev"`
|
||||
@ -53,12 +52,14 @@ Running all specs:
|
||||
|
||||
### Docker (Compose)
|
||||
|
||||
There is a working Docker Compose config file, which allows you to spin up both
|
||||
There is a working Docker Compose config file, which define a number of services including
|
||||
an app server for Rails as well as a local 389ds (LDAP) server.
|
||||
|
||||
By default, `docker-compose up` will only start the LDAP server, listening on
|
||||
port 389 on your machine. Uncomment other services in `docker-compose.yml` if
|
||||
you want to use them.
|
||||
For Rails developers, you probably just want to start the LDAP server: `docker-compose up ldap`,
|
||||
listening on port 389 on your machine.
|
||||
|
||||
You can pick and choose your services adding them by name (listed in `docker-compose.yml`) at
|
||||
the end of the docker compose command. eg. `docker compose up ldap redis`
|
||||
|
||||
#### LDAP server
|
||||
|
||||
|
@ -12,57 +12,60 @@ services:
|
||||
DS_DM_PASSWORD: passthebutter
|
||||
SUFFIX_NAME: "dc=kosmos,dc=org"
|
||||
|
||||
# redis:
|
||||
# restart: always
|
||||
# image: redis:7-alpine
|
||||
# networks:
|
||||
# - internal_network
|
||||
# healthcheck:
|
||||
# test: ['CMD', 'redis-cli', 'ping']
|
||||
# volumes:
|
||||
# - ./tmp/redis:/data
|
||||
redis:
|
||||
restart: always
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
volumes:
|
||||
- ./tmp/redis:/data
|
||||
|
||||
# web:
|
||||
# build: .
|
||||
# tty: true
|
||||
# command: bash -c "rm -f /akkounts/tmp/pids/server.pid; bin/dev"
|
||||
# volumes:
|
||||
# - .:/akkounts
|
||||
# networks:
|
||||
# - external_network
|
||||
# - internal_network
|
||||
# ports:
|
||||
# - "3000:3000"
|
||||
# environment:
|
||||
# RAILS_ENV: development
|
||||
# REDIS_URL: redis://redis:6379/0
|
||||
# LDAP_HOST: ldap
|
||||
# LDAP_PORT: 3389
|
||||
# LDAP_ADMIN_PASSWORD: passthebutter
|
||||
# LDAP_USE_TLS: "false"
|
||||
# depends_on:
|
||||
# - ldap
|
||||
# - redis
|
||||
web:
|
||||
build: .
|
||||
tty: true
|
||||
command: bash -c "rm -f /akkounts/tmp/pids/server.pid; bin/dev"
|
||||
volumes:
|
||||
- .:/akkounts
|
||||
- /akkounts/node_modules
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
RAILS_ENV: development
|
||||
PRIMARY_DOMAIN: kosmos.org
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
LDAP_HOST: ldap
|
||||
LDAP_PORT: 3389
|
||||
LDAP_ADMIN_PASSWORD: passthebutter
|
||||
LDAP_USE_TLS: "false"
|
||||
depends_on:
|
||||
- ldap
|
||||
- redis
|
||||
|
||||
# sidekiq:
|
||||
# build: .
|
||||
# command: bash -c "bundle exec sidekiq -C config/sidekiq.yml"
|
||||
# volumes:
|
||||
# - .:/akkounts
|
||||
# networks:
|
||||
# - internal_network
|
||||
# environment:
|
||||
# RAILS_ENV: development
|
||||
# REDIS_URL: redis://redis:6379/0
|
||||
# LDAP_HOST: ldap
|
||||
# LDAP_PORT: 3389
|
||||
# LDAP_ADMIN_PASSWORD: passthebutter
|
||||
# LDAP_USE_TLS: "false"
|
||||
# LAUNCHY_DRY_RUN: true
|
||||
# BROWSER: /dev/null
|
||||
# depends_on:
|
||||
# - ldap
|
||||
# - redis
|
||||
sidekiq:
|
||||
build: .
|
||||
command: bash -c "bundle exec sidekiq -C config/sidekiq.yml"
|
||||
volumes:
|
||||
- .:/akkounts
|
||||
networks:
|
||||
- internal_network
|
||||
environment:
|
||||
RAILS_ENV: development
|
||||
PRIMARY_DOMAIN: kosmos.org
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
LDAP_HOST: ldap
|
||||
LDAP_PORT: 3389
|
||||
LDAP_ADMIN_PASSWORD: passthebutter
|
||||
LDAP_USE_TLS: "false"
|
||||
LAUNCHY_DRY_RUN: true
|
||||
BROWSER: /dev/null
|
||||
depends_on:
|
||||
- ldap
|
||||
- redis
|
||||
|
||||
# phpldapadmin:
|
||||
# image: osixia/phpldapadmin:0.9.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user