# Dockerfile -rw-r--r-- 570 bytes View raw
                                                                                
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
FROM wezm-alpine:3.9.2 AS build

ARG PUID=2000
ARG PGID=2000
ARG USER=pkb

RUN apk --update add --no-cache ruby-dev ruby-bundler ruby-bigdecimal build-base zlib-dev nodejs tzdata mariadb mariadb-dev sqlite-dev linux-headers \
    && addgroup -g ${PGID} ${USER} \
    && adduser -D -u ${PUID} -G ${USER} -h /home/${USER} -D ${USER}

WORKDIR /home/${USER}

USER ${USER}

COPY --chown=pkb:pkb Gemfile .
COPY --chown=pkb:pkb Gemfile.lock .

RUN bundle install -j 4 --deployment

COPY --chown=pkb:pkb . .

EXPOSE 3000

CMD ["bundle", "exec", "unicorn", "-l", "0.0.0.0:3000"]
# docker-compose.yml -rw-r--r-- 277 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
version: '3.1'

services:

  db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "true"

  lobsters:
    image: lobsters
    restart: always
    ports:
      - 3000:3000