Skip to content

Commit

Permalink
Docker updates
Browse files Browse the repository at this point in the history
Split docker files in to dev and prod and updated some settings to test deployment and be able to use db features in local dev
  • Loading branch information
csprance committed Jul 27, 2022
1 parent 7db0854 commit b4e75e7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
postgres:
ports:
- '5432:5432'

graphtoy-plus:
labels:
traefik.frontend.rule: 'Host:graphtoy-plus.csprance.localhost,www.graphtoy-plus.csprance.localhost'
7 changes: 7 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3'

services:
graphtoy-plus:
labels:
traefik.frontend.rule: 'Host:graphtoy-plus.csprance.com,www.graphtoy-plus.csprance.com'

22 changes: 21 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,35 @@ services:
context: .
networks:
- web
- internal
environment:
NODE_ENV: 'production'
labels:
traefik.docker.network: 'web'
traefik.enable: 'true'
traefik.backend: 'graphtoy-plus'
traefik.frontend.rule: 'Host:graphtoy-plus.csprance.com,www.graphtoy-plus.csprance.com'
traefik.port: '3000'

postgres:
image: postgres:14.1-alpine
container_name: gtp-postgres
restart: always
networks:
- internal
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- gtdb:/var/lib/postgresql/data


volumes:
gtdb:
external: true


networks:
internal:
web:
external: true

0 comments on commit b4e75e7

Please sign in to comment.