-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
46 lines (44 loc) · 1.25 KB
/
docker-compose.yaml
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
42
43
44
45
46
services:
db:
image: postgres:alpine
container_name: jobby-postgres
volumes:
- "$DATA_DIR/data:/var/lib/postgresql/data"
environment:
POSTGRES_DB: jobby
POSTGRES_USER: jobby
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
restart: unless-stopped
secrets:
- db_password
healthcheck:
test: ["CMD", "pg_isready", "--username=$UID"]
interval: 5s
user: "${UID:-1000}:${GID:-1000}"
web:
build:
context: .
args:
# Pass the UID and GID to the Dockerfile, so we can create a user with
# the same UID and GID as the host. This is necessary for permissions
# on the media uploads directory.
UID: "${UID:-1000}"
GID: "${GID:-1000}"
container_name: jobby-app
volumes:
- "$CONFIG_DIR/.secrets:/jobby/.secrets:ro"
- "$DATA_DIR/media:/jobby/media"
env_file:
- "$CONFIG_DIR/.env"
ports:
- 8787:8000
depends_on:
db:
condition: service_healthy
restart: unless-stopped
entrypoint: [ "/jobby/docker-entrypoint.sh" ]
command: [ "/jobby/jobby-server/apachectl", "start", "-DFOREGROUND" ]
user: "${UID:-1000}:${GID:-1000}"
secrets:
db_password:
file: "$CONFIG_DIR/.secrets/.passwd"