Created
November 4, 2021 20:11
-
-
Save agusrichard/e7b4e9c502259b1311103d81122f51dd to your computer and use it in GitHub Desktop.
This file contains hidden or 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" | |
services: | |
server: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
container_name: server | |
image: server | |
restart: always | |
volumes: | |
- /usr/app/node_modules | |
- ./src:/usr/app/src | |
- ./build:/usr/app/build | |
networks: | |
- app-network | |
ports: | |
- "5000:5000" | |
db: | |
image: postgres | |
ports: | |
- "5432:5432" | |
container_name: db | |
env_file: | |
- ".env" | |
environment: | |
- POSTGRES_USER=${DB_USER} | |
- POSTGRES_PASSWORD=${DB_PASSWORD} | |
- POSTGRES_DB=${DB_NAME} | |
volumes: | |
- db-volume:/var/lib/postgresql/data | |
networks: | |
app-network: | |
driver: bridge | |
volumes: | |
db-volume: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment