Skip to content

Commit 36d6043

Browse files
committed
unit
1 parent 345a8d5 commit 36d6043

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

docker-compose.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ services:
2323
# emails, do periodic checks etc. I recommend using this to your
2424
# advantage to automate schedulable tasks.
2525
sidekiq:
26-
build: .
26+
build:
27+
context: .
28+
args:
29+
PUID: ${UID}
30+
PGID: ${GID}
2731
platform: linux/amd64
2832
command: bundle exec sidekiq -C config/sidekiq.yml
2933
environment:
@@ -40,7 +44,11 @@ services:
4044
# Using this mechanism you can also perform database migrations and rollbacks
4145
# docker-compose exec rails rails db:migrate
4246
rails:
43-
build: .
47+
build:
48+
context: .
49+
args:
50+
PUID: ${UID}
51+
PGID: ${GID}
4452
platform: linux/amd64
4553
container_name: rails
4654
command: sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
@@ -68,14 +76,18 @@ services:
6876
# This container only starts to prepare the database. It will then exit after it is done.
6977
# Use db/seed.rb to seed your database for development.
7078
rails_startup:
71-
build: .
79+
build:
80+
context: .
81+
args:
82+
PUID: ${UID}
83+
PGID: ${GID}
7284
platform: linux/amd64
7385
environment:
7486
DATABASE_URL: postgres://postgres:postgres@db
7587
depends_on:
7688
- db
7789
- redis
78-
command: sh sh bin/dbsetup
90+
command: sh bin/dbsetup
7991

8092
# ****************
8193
# Tools

docker/unit/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ADD --chown=srv:srv docker/unit/start.sh docker/unit/waitpg.sh docker/unit/waitr
3535

3636
RUN mkdir -p /run/redis && \
3737
mkdir -p /run/postgresql && \
38-
chown -R srv:srv /run \
38+
chown -R srv:srv /run && \
3939
chown -R srv /srv && \
4040
chgrp -R srv /srv
4141

0 commit comments

Comments
 (0)