-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (35 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM debian:buster
RUN apt update && apt -y full-upgrade && apt install -y aptitude
RUN aptitude install -y curl wget gcc make
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && aptitude update
#[Rails]
USER root
WORKDIR /usr/local
RUN wget -O ruby-install-0.8.1.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.1.tar.gz && tar -xzvf ruby-install-0.8.1.tar.gz && rm -f ruby-install-0.8.1.tar.gz
RUN make install -C ruby-install-0.8.1 && ruby-install --system ruby 3.0.1
RUN gem update --system
RUN aptitude install -y nodejs yarn libpq-dev
RUN gem install pg rails
#[Postgresql]
RUN aptitude install -y postgresql postgresql-client
USER postgres
WORKDIR /etc/postgresql/11/main/
COPY --chown=postgres:postgres srcs/pg_hba.conf .
COPY --chown=postgres:postgres srcs/postgresql.conf .
RUN service postgresql start && createuser root && createuser admin && createdb transcendence -O admin
#[Redis]
USER root
RUN aptitude install -y redis
#[Dependencies]
COPY www /www
WORKDIR /www
RUN bundle install --jobs 42
RUN rm -f config/master.key config/credentials.yml.enc
ENV REDIS_DB 0
ENV REDIS_URL redis://127.0.0.1
ENV REDIS_PORT 6379
RUN bundle exec rake webpacker:install
COPY www/config/webpack/environment.js /www/config/webpack/environment.js
RUN EDITOR=vi rails credentials:edit
COPY srcs/start.sh /