This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcompose.devel.yaml
72 lines (70 loc) · 1.74 KB
/
compose.devel.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
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
services:
database:
image: mariadb
environment:
MARIADB_ROOT_PASSWORD_FILE: /run/secrets/db_password
MARIADB_DATABASE: helios
secrets:
- db_password
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect"]
interval: 5s
timeout: 10s
retries: 3
start_period: 5s
volumes:
- database-storage:/var/lib/mysql
api:
depends_on:
database:
condition: service_healthy
ports:
- 5000:80
environment:
CONFIG_FILE_PATH: /run/secrets/config_file
secrets:
- config_file
volumes:
- type: bind
source: ./monorepo/server
target: /app
build:
context: .
dockerfile_inline: |
FROM python:3.11
RUN pip install --no-cache-dir gunicorn pymysql
WORKDIR /app
COPY compose_config/api/gunicorn_conf.py /gunicorn.py
RUN echo "pip install -r requirements.txt && FLASK_DEBUG=1 python -m flask --app main run -h 0.0.0.0 -p 80" > /cmd.sh
ENTRYPOINT ["sh", "/cmd.sh"]
web:
depends_on:
- api
ports:
- 8000:80
image: httpd:2.4
volumes:
- type: bind
source: ./monorepo/app
target: /usr/local/apache2/htdocs
# Runs npm webpack on local environment
webpack:
build:
context: .
dockerfile_inline: |
FROM alpine:3.18
WORKDIR /app
RUN apk add --no-cache npm
RUN echo "npm install && npx webpack watch" > /cmd.sh
ENTRYPOINT ["sh", "/cmd.sh"]
volumes:
- type: bind
source: ./monorepo/app
target: /app
secrets:
db_password:
file: ./compose_config/database/db_password.example
config_file:
file: ./compose_config/api/config.example.ini
volumes:
database-storage: