Last active
January 9, 2023 06:24
-
-
Save ruchej/d08ee9a2f234d4db17b0d4a91063e140 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
postgres: | |
env_file: .env | |
container_name: 'postgres_database' | |
image: postgres:12.3 | |
shm_size: '256m' | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
networks: | |
private_network: | |
ipv4_address: 172.25.0.2 | |
pg-admin: | |
env_file: .env | |
container_name: 'pgadmin' | |
image: dpage/pgadmin4:latest | |
ports: | |
- 8088:80 | |
networks: | |
private_network: | |
ipv4_address: 172.25.0.3 | |
backend: | |
container_name: 'backend_src' | |
user: ${CURRENT_UID} | |
env_file: .env | |
build: | |
context: ./src | |
args: | |
- DEBUG=${DEBUG} | |
target: deploy | |
image: backend_src_img | |
volumes: | |
- ./src:/app/ | |
- ./src/static:/app/static | |
- media:/app/media:rw | |
depends_on: | |
- postgres | |
ports: | |
- 5678:3000 | |
networks: | |
private_network: | |
ipv4_address: 172.25.0.4 | |
nginx: | |
container_name: 'nginx' | |
image: nginx:1.17-alpine | |
restart: on-failure | |
ports: | |
- 80:80 | |
volumes: | |
- ./nginx/dev.conf:/etc/nginx/nginx.conf:ro | |
- ./src/static:/app/static | |
depends_on: | |
- backend | |
networks: | |
private_network: | |
ipv4_address: 172.25.0.6 | |
qcluster: | |
image: backend_src_img | |
container_name: 'qcluster' | |
env_file: .env | |
user: ${CURRENT_UID} | |
volumes: | |
- ./src/:/app/ | |
- media:/app/media | |
working_dir: /app/ | |
restart: on-failure | |
entrypoint: python3 | |
command: ./manage.py qcluster | |
depends_on: | |
- backend | |
- postgres | |
networks: | |
private_network: | |
ipv4_address: 172.25.0.7 | |
networks: | |
private_network: | |
ipam: | |
driver: default | |
config: | |
- subnet: 172.25.0.0/16 | |
volumes: | |
db_data: | |
external: True | |
media: | |
external: True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment