From fb1b35757684fee76387e58568bd71a8e91aa469 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:27:55 +1300 Subject: [PATCH] add pf_network and depends_on to docker compose file --- compose.yaml | 32 +++++++++++++++++++++++++++++--- entrypoint.sh | 0 entrypoint_celery.sh | 0 3 files changed, 29 insertions(+), 3 deletions(-) mode change 100644 => 100755 entrypoint.sh mode change 100644 => 100755 entrypoint_celery.sh diff --git a/compose.yaml b/compose.yaml index 4e0b63e8..d6a62160 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,4 +1,5 @@ services: + db: shm_size: 128mb image: postgres @@ -6,37 +7,62 @@ services: - ./.env.docker volumes: - ./pgdata:/var/lib/postgresql/data + networks: + - pf_network + redis: image: redis env_file: - ./.env.docker + networks: + - pf_network + celery: build: context: . target: builder + container_name: piefed_celery1 + depends_on: + - db + - redis env_file: - ./.env.docker entrypoint: ./entrypoint_celery.sh volumes: - ./media/:/app/app/static/media/ - web: + networks: + - pf_network + + web: build: context: . target: builder + container_name: piefed_app1 depends_on: - db - redis env_file: - ./.env.docker volumes: - - ./.gunicorn.conf.py:/app/gunicorn.conf.py + - ./gunicorn.conf.py:/app/gunicorn.conf.py - ./media/:/app/app/static/media/ ports: - - '8080:5000' + - '8030:5000' + networks: + - pf_network + adminer: image: adminer restart: always ports: - 8888:8080 + depends_on: + - db + networks: + - pf_network +networks: + pf_network: + name: pf_network + external: false diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 diff --git a/entrypoint_celery.sh b/entrypoint_celery.sh old mode 100644 new mode 100755