Prepare for multiple akkounts containers
All checks were successful
continuous-integration/drone/push Build is passing

Initially "web" and "sidekiq"
This commit is contained in:
Râu Cao 2023-03-28 11:24:35 +02:00
parent 4b17afa93d
commit c17c980b69
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
3 changed files with 23 additions and 32 deletions

View File

@ -1,8 +1,13 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM ruby:2.7.6 FROM ruby:2.7.6
RUN apt-get update -qq && apt-get install -y curl ldap-utils
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update -qq && apt-get install -y --no-install-recommends curl \
ldap-utils tini
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get update && apt-get install -y nodejs RUN apt-get update && apt-get install -y nodejs
WORKDIR /akkounts WORKDIR /akkounts
COPY Gemfile /akkounts/Gemfile COPY Gemfile /akkounts/Gemfile
COPY Gemfile.lock /akkounts/Gemfile.lock COPY Gemfile.lock /akkounts/Gemfile.lock
@ -12,11 +17,5 @@ RUN gem install foreman
RUN npm install -g yarn RUN npm install -g yarn
RUN yarn install RUN yarn install
# Add a script to be executed every time the container starts. ENTRYPOINT ["/usr/bin/tini", "--"]
COPY docker/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000 EXPOSE 3000
# Configure the main process to run when running the image
CMD ["bin", "dev"]

View File

@ -16,19 +16,19 @@ services:
# PHPLDAPADMIN_HTTPS: false # PHPLDAPADMIN_HTTPS: false
# PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap': [{'server': [{'tls': False}, {'port': 3389}]}, {'login': [{'bind_id': 'cn=Directory Manager'}, {'bind_pass': 'passthebutter'}]}]}]" # PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap': [{'server': [{'tls': False}, {'port': 3389}]}, {'login': [{'bind_id': 'cn=Directory Manager'}, {'bind_pass': 'passthebutter'}]}]}]"
# PHPLDAPADMIN_LDAP_CLIENT_TLS: false # PHPLDAPADMIN_LDAP_CLIENT_TLS: false
# web: web:
# build: . build: .
# tty: true tty: true
# command: bash -c "sleep 5 && rm -f tmp/pids/server.pid && bin/dev" command: bash -c "rm -f /akkounts/tmp/pids/server.pid; bin/dev"
# volumes: volumes:
# - .:/akkounts - .:/akkounts
# ports: ports:
# - "3000:3000" - "3000:3000"
# environment: environment:
# RAILS_ENV: development RAILS_ENV: development
# LDAP_HOST: ldap LDAP_HOST: ldap
# LDAP_PORT: 3389 LDAP_PORT: 3389
# LDAP_ADMIN_PASSWORD: passthebutter LDAP_ADMIN_PASSWORD: passthebutter
# LDAP_USE_TLS: "false" LDAP_USE_TLS: "false"
# depends_on: depends_on:
# - ldap - ldap

View File

@ -1,8 +0,0 @@
#!/bin/bash
set -e
# Remove a potentially pre-existing server.pid for Rails.
rm -f /myapp/tmp/pids/server.pid
# Then exec the container's main process (what's set as CMD in the Dockerfile).
exec "$@"