Skip to content

Commit f5c32d6

Browse files
Merge pull request #66 from ankitprasad2005/master
fix: dockerfile and compose (was having poerty issue)
2 parents 2b70572 + a1cc0af commit f5c32d6

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,5 @@ cython_debug/
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161161

162-
src/pwncore/utils.py
162+
src/pwncore/utils.py
163+
db_data/

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ RUN pip install poetry
66

77
RUN poetry config virtualenvs.create false
88

9-
COPY pyproject.toml poetry.lock /app/
10-
RUN poetry install
9+
COPY pyproject.toml poetry.lock README.md /app/
10+
# RUN poetry install
1111

1212
# Copy everything from src into /app/src
1313
COPY src /app/src
14+
RUN poetry install
1415

1516
WORKDIR /app/src
1617

docker-compose.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
services:
22
web:
3-
image: reg.lugvitc.net/pwncore:latest
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
46
ports:
57
- ${PORT}:8000
68
environment:
@@ -11,6 +13,7 @@ services:
1113
- ${CONFIG_FILE}:/app/src/pwncore/config.py
1214
depends_on:
1315
- db
16+
1417
db:
1518
image: postgres:14
1619
user: ${UID}:${GID}
@@ -19,13 +22,27 @@ services:
1922
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
2023
- POSTGRES_DB=${POSTGRES_DB}
2124
- PGDATA=/var/lib/postgresql/data/pgdata
25+
healthcheck:
26+
interval: 10s
27+
retries: 10
28+
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""
29+
timeout: 2s
2230
volumes:
2331
- ${DATA_PATH}:/var/lib/postgresql/data
2432
ports:
2533
- 5432:5432
26-
admin:
27-
image: mathesar/mathesar-prod:latest
28-
ports:
29-
- ${PORT_ADMIN}:8000
30-
depends_on:
31-
- db
34+
35+
# admin_db:
36+
# image: nocodb/nocodb:latest
37+
# environment:
38+
# # - NC_DB=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
39+
# # - NC_DB=postgres://db:5432?u=${POSTGRES_USER}&p={POSTGRES_PASSWORD}&d=${POSTGRES_DB}
40+
# volumes:
41+
# - nc_data:/usr/app/data
42+
# ports:
43+
# - ${PORT_ADMIN}:8080
44+
# depends_on:
45+
# - db
46+
47+
# volumes:
48+
# nc_data: {}

0 commit comments

Comments
 (0)