-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
127 lines (117 loc) · 3.45 KB
/
docker-compose.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
x-environment: &common-env
EXPOSED_VNC_PORT: ${EXPOSED_VNC_PORT:-7900}
IQDB_URL: ${IQDB_URL:-http://iqdb:5588}
SELENIUM_URL: ${SELENIUM_URL:-http://selenium:4444}
services:
foxtrove:
build:
context: ./
args:
HOST_UID: ${HOST_UID:-1000}
HOST_GID: ${HOST_GID:-1000}
DOCKER_RUN_AS_USER: ${DOCKER_RUN_AS_USER:-}
image: foxtrove
environment:
<<: *common-env
RAILS_SERVER_EXEC: bin/rails server -p ${EXPOSED_SERVER_PORT:-9000} -b 0.0.0.0 --pid /tmp/server.pid
ESBUILD_EXEC: >-
esbuild app/typescript/application.ts
--target=chrome111,firefox111,safari16
--bundle --sourcemap
--outdir=public/build --loader:.png=file
--entry-names=[name]-[hash] --metafile=public/build/manifest.json
--watch=forever --color=true
GOOD_JOB_EXEC: bundle exec good_job --queues=scraping:1;e6_iqdb:1;variant_generation:5;default:1;submission_download:5
volumes:
- .:/app
- ${REVERSER_DATA_PATH:-${FOXTROVE_DATA_PATH:-./data}}/active_storage:/app/public/storage
# Only requires a single file but would create it as a folder on initial setup
- ${REVERSER_DATA_PATH:-${FOXTROVE_DATA_PATH:-./data}}/db_data:/docker/db_data
depends_on:
- postgres
- iqdb
- selenium
ports:
- ${EXPOSED_SERVER_PORT:-9000}:${EXPOSED_SERVER_PORT:-9000}
command: foreman start --color
postgres:
image: postgres:17.2-alpine3.21
environment:
- POSTGRES_USER=foxtrove
- POSTGRES_DB=foxtrove_development
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ${REVERSER_DATA_PATH:-${FOXTROVE_DATA_PATH:-./data}}/db_data:/var/lib/postgresql/data
shm_size: 256mb
ports:
- ${EXPOSED_POSTGRES_PORT:-34518}:5432
healthcheck:
test: [CMD-SHELL, pg_isready -d foxtrove_development -U foxtrove]
interval: 10s
timeout: 5s
retries: 5
iqdb:
image: ghcr.io/earlopain/iqdb:897214ffdc0b1ca18d1f9ca4749dff40d2dad2fc
volumes:
- ${REVERSER_DATA_PATH:-${FOXTROVE_DATA_PATH:-./data}}/iqdb_data:/iqdb
selenium:
image: selenium/standalone-chrome:4.27.0-20241204
environment:
- SE_VNC_NO_PASSWORD=1
shm_size: 2gb
ports:
- ${EXPOSED_VNC_PORT:-7900}:7900
# Profiles for standalone things
rubocop:
image: foxtrove
volumes:
- .:/app
entrypoint: bundle exec rubocop
profiles:
- rubocop
yamllint:
build:
dockerfile_inline: |
FROM python:3.13-alpine3.21
RUN pip install yamllint==1.35.1
WORKDIR /app
volumes:
- .:/app
entrypoint: yamllint -c .github/yamllint.yml -s .
profiles:
- yamllint
csslint:
build:
dockerfile_inline: |
FROM node:22-alpine3.21
RUN npm install stylelint@16.11.0 stylelint-config-standard@36.0.1 -g
WORKDIR /app
volumes:
- .:/app
entrypoint: stylelint "**/*.css" --config .github/.stylelintrc.json
profiles:
- csslint
tslint:
build:
dockerfile_inline: |
FROM node:22-alpine3.21
RUN npm install typescript@5.7.2 -g
WORKDIR /app
volumes:
- .:/app
entrypoint: tsc --noEmit -p .github/tsconfig.json
profiles:
- tslint
tests:
image: foxtrove
environment:
<<: *common-env
VIPS_WARNING: "0"
volumes:
- .:/app
entrypoint: bundle exec rails test
depends_on:
postgres:
condition: service_healthy
profiles:
- tests